LLVM 20.0.0git
|
#include "llvm/Transforms/Coroutines/CoroElide.h"
#include "CoroInternal.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include <optional>
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 Instruction * | getFirstNonAllocaInTheEntryBlock (Function *F) |
static std::unique_ptr< raw_fd_ostream > | getOrCreateLogFile () |
Variables | |
static 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) |
#define DEBUG_TYPE "coro-elide" |
Definition at line 24 of file CoroElide.cpp.
|
static |
Definition at line 140 of file CoroElide.cpp.
References F, I, and llvm_unreachable.
Definition at line 131 of file CoroElide.cpp.
References llvm::Function::getParamAlign(), llvm::Function::getParamDereferenceableBytes(), Size, and llvm::MaybeAlign::valueOrOne().
|
static |
Definition at line 148 of file CoroElide.cpp.
References assert(), CoroElideInfoOutputFilename, llvm::errs(), and llvm::sys::fs::OF_Append.
|
static |
Definition at line 105 of file CoroElide.cpp.
References llvm::AAResults::isNoAlias(), and llvm::User::operand_values().
Referenced by removeTailCallAttribute().
|
static |
Definition at line 119 of file CoroElide.cpp.
References F, llvm::Instruction::getFunction(), I, instructions, and operandReferences().
|
static |
Definition at line 82 of file CoroElide.cpp.
References assert(), llvm::ConstantExpr::getBitCast(), llvm::Value::getType(), I, llvm::Type::isPointerTy(), llvm::replaceAndRecursivelySimplify(), and Users.
STATISTIC | ( | NumOfCoroElided | , |
"The # of coroutine get elided." | |||
) |
|
static |
Referenced by getOrCreateLogFile().