Skip to content

optimization: when initializing struct fields, and some are undefined, sometimes initialize individual fields instead of memcpy #251

Open
@andrewrk

Description

@andrewrk
  • In debug mode, initialize undefined memory to 0xaa, including llvm globals.
  • In release mode, when a variable is initialized to undefined, omit the initialization.
  • In release mode, if some fields of a struct, or some list elements in an array are undefined, but some are not, codegen this to individual assignments instead of a single memcpy.

It might make sense to remove the init value from a var decl instruction and make that a normal assignment instruction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.optimization

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions