LLVM
8.0.1
|
#include "CoroInternal.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/Pass.h"
#include "llvm/Support/ErrorHandling.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "coro-elide" |
Functions | |
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 Type * | getFrameType (Function *Resume) |
static Instruction * | getFirstNonAllocaInTheEntryBlock (Function *F) |
static bool | replaceDevirtTrigger (Function &F) |
INITIALIZE_PASS_BEGIN (CoroElide, "coro-elide", "Coroutine frame allocation elision and indirect calls replacement", false, false) INITIALIZE_PASS_END(CoroElide | |
Variables | |
coro | elide |
coro Coroutine frame allocation elision and indirect calls | replacement |
coro Coroutine frame allocation elision and indirect calls | false |
#define DEBUG_TYPE "coro-elide" |
Definition at line 24 of file CoroElide.cpp.
|
static |
Definition at line 100 of file CoroElide.cpp.
References assert(), B, C, llvm::CoroSubFnInst::CleanupIndex, llvm::CoroSubFnInst::DestroyIndex, llvm::DominatorTree::dominates(), F(), llvm::DataLayout::getAllocaAddrSpace(), llvm::Type::getContext(), llvm::Module::getDataLayout(), llvm::Function::getEntryBlock(), llvm::ConstantExpr::getExtractValue(), llvm::ConstantInt::getFalse(), getFrameType(), llvm::Instruction::getFunction(), llvm::CoroIdInst::getInfo(), llvm::Type::getInt8PtrTy(), llvm::GlobalValue::getParent(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm_unreachable, removeTailCallAttribute(), llvm::coro::replaceCoroFree(), replaceWithConstant(), llvm::CoroSubFnInst::ResumeIndex, llvm::CoroIdInst::Info::Resumers, llvm::SmallPtrSetImplBase::size(), and llvm::Value::users().
Definition at line 94 of file CoroElide.cpp.
References llvm::Function::arg_begin(), and llvm::Value::getType().
Referenced by getFirstNonAllocaInTheEntryBlock().
INITIALIZE_PASS_BEGIN | ( | CoroElide | , |
"coro-elide" | , | ||
"Coroutine frame allocation elision and indirect calls replacement" | , | ||
false | , | ||
false | |||
) |
Referenced by replaceDevirtTrigger().
|
static |
Definition at line 69 of file CoroElide.cpp.
References llvm::AAResults::alias(), llvm::NoAlias, and llvm::User::operand_values().
Referenced by removeTailCallAttribute().
|
static |
Definition at line 79 of file CoroElide.cpp.
References F(), llvm::Instruction::getFunction(), I, llvm::instructions(), operandReferences(), and llvm::report_fatal_error().
Referenced by getFirstNonAllocaInTheEntryBlock().
Definition at line 257 of file CoroElide.cpp.
References llvm::AnalysisUsage::addRequired(), assert(), CORO_DEVIRT_TRIGGER_FN, CORO_PRESPLIT_ATTR, llvm::coro::declaresIntrinsics(), llvm::SmallVectorBase::empty(), llvm::Module::getFunction(), llvm::GlobalValue::getParent(), llvm::PassRegistry::getPassRegistry(), llvm::Function::hasFnAttribute(), I, INITIALIZE_PASS_BEGIN(), INITIALIZE_PASS_DEPENDENCY, INITIALIZE_PASS_END(), llvm::initializeCoroElidePass(), llvm::instructions(), llvm::SmallVectorTemplateBase< T >::push_back(), replaceWithConstant(), llvm::CoroSubFnInst::RestartTrigger, and runOnFunction().
|
static |
Definition at line 46 of file CoroElide.cpp.
References assert(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T >::front(), llvm::ConstantExpr::getBitCast(), llvm::Value::getType(), I, llvm::Type::isPointerTy(), and llvm::replaceAndRecursivelySimplify().
Referenced by getFirstNonAllocaInTheEntryBlock(), and replaceDevirtTrigger().
coro elide |
Definition at line 340 of file CoroElide.cpp.
coro Coroutine frame allocation elision and indirect calls false |
Definition at line 340 of file CoroElide.cpp.
coro Coroutine frame allocation elision and indirect calls replacement |
Definition at line 340 of file CoroElide.cpp.