LLVM 22.0.0git
MoveAutoInit.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "move-auto-init"

Functions

 STATISTIC (NumMoved, "Number of instructions moved")
static bool hasAutoInitMetadata (const Instruction &I)
static std::optional< MemoryLocationwriteToAlloca (const Instruction &I)
static BasicBlockusersDominator (const MemoryLocation &ML, Instruction *I, DominatorTree &DT, MemorySSA &MSSA)
 Finds a BasicBlock in the CFG where instruction I can be moved to while not changing the Memory SSA ordering and being guarded by at least one condition.
static bool runMoveAutoInit (Function &F, DominatorTree &DT, MemorySSA &MSSA)

Variables

static cl::opt< unsignedMoveAutoInitThreshold ("move-auto-init-threshold", cl::Hidden, cl::init(128), cl::desc("Maximum instructions to analyze per moved initialization"))

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "move-auto-init"

Definition at line 29 of file MoveAutoInit.cpp.

Function Documentation

◆ hasAutoInitMetadata()

bool hasAutoInitMetadata ( const Instruction & I)
static

Definition at line 37 of file MoveAutoInit.cpp.

References llvm::any_of(), and I.

Referenced by runMoveAutoInit().

◆ runMoveAutoInit()

◆ STATISTIC()

STATISTIC ( NumMoved ,
"Number of instructions moved"  )

◆ usersDominator()

◆ writeToAlloca()

std::optional< MemoryLocation > writeToAlloca ( const Instruction & I)
static

Variable Documentation

◆ MoveAutoInitThreshold

cl::opt< unsigned > MoveAutoInitThreshold("move-auto-init-threshold", cl::Hidden, cl::init(128), cl::desc("Maximum instructions to analyze per moved initialization")) ( "move-auto-init-threshold" ,
cl::Hidden ,
cl::init(128) ,
cl::desc("Maximum instructions to analyze per moved initialization")  )
static

Referenced by usersDominator().