LLVM 22.0.0git
CoroElide.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "coro-elide"

Functions

 STATISTIC (NumOfCoroElided, "The # of coroutine get elided.")
static void replaceWithConstant (Constant *Value, SmallVectorImpl< CoroSubFnInst * > &Users)
static bool operandReferences (CallInst *CI, AllocaInst *Frame, AAResults &AA)
static void removeTailCallAttribute (AllocaInst *Frame, AAResults &AA)
static std::optional< std::pair< uint64_t, Align > > getFrameLayout (Function *Resume)
static InstructiongetFirstNonAllocaInTheEntryBlock (Function *F)
static std::unique_ptr< raw_fd_ostreamgetOrCreateLogFile ()

Variables

static cl::opt< std::stringCoroElideInfoOutputFilename ("coro-elide-info-output-file", cl::value_desc("filename"), cl::desc("File to record the coroutines got elided"), cl::Hidden)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "coro-elide"

Definition at line 24 of file CoroElide.cpp.

Function Documentation

◆ getFirstNonAllocaInTheEntryBlock()

Instruction * getFirstNonAllocaInTheEntryBlock ( Function * F)
static

Definition at line 124 of file CoroElide.cpp.

References F, I, llvm::isa(), and llvm_unreachable.

◆ getFrameLayout()

std::optional< std::pair< uint64_t, Align > > getFrameLayout ( Function * Resume)
static

◆ getOrCreateLogFile()

std::unique_ptr< raw_fd_ostream > getOrCreateLogFile ( )
static

◆ operandReferences()

bool operandReferences ( CallInst * CI,
AllocaInst * Frame,
AAResults & AA )
static

Definition at line 89 of file CoroElide.cpp.

References llvm::User::operand_values().

Referenced by removeTailCallAttribute().

◆ removeTailCallAttribute()

void removeTailCallAttribute ( AllocaInst * Frame,
AAResults & AA )
static

◆ replaceWithConstant()

void replaceWithConstant ( Constant * Value,
SmallVectorImpl< CoroSubFnInst * > & Users )
static

Definition at line 82 of file CoroElide.cpp.

References I, llvm::replaceAndRecursivelySimplify(), and Users.

◆ STATISTIC()

STATISTIC ( NumOfCoroElided ,
"The # of coroutine get elided."  )

Variable Documentation

◆ CoroElideInfoOutputFilename

cl::opt< std::string > CoroElideInfoOutputFilename("coro-elide-info-output-file", cl::value_desc("filename"), cl::desc("File to record the coroutines got elided"), cl::Hidden) ( "coro-elide-info-output-file" ,
cl::value_desc("filename") ,
cl::desc("File to record the coroutines got elided") ,
cl::Hidden  )
static

Referenced by getOrCreateLogFile().