LLVM
15.0.0git
|
#include "CoroInternal.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Analysis/PtrUseVisitor.h"
#include "llvm/Analysis/StackLifetime.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/OptimizedStructLayout.h"
#include "llvm/Support/circular_raw_ostream.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/PromoteMemToReg.h"
#include <algorithm>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "coro-suspend-crossing" |
#define | DEBUG_TYPE "coro-frame" |
Typedefs | |
typedef SmallPtrSet< BasicBlock *, 8 > | VisitedBlocksSet |
Enumerations | |
enum | { SmallVectorThreshold = 32 } |
Functions | |
static void | dumpSpills (StringRef Title, const SpillInfo &Spills) |
static void | dumpAllocas (const SmallVectorImpl< AllocaInfo > &Allocas) |
static void | cacheDIVar (FrameDataInfo &FrameData, DenseMap< Value *, DILocalVariable * > &DIVarCache) |
static StringRef | solveTypeName (Type *Ty) |
Create name for Type. More... | |
static DIType * | solveDIType (DIBuilder &Builder, Type *Ty, const DataLayout &Layout, DIScope *Scope, unsigned LineNum, DenseMap< Type *, DIType * > &DITypeCache) |
static void | buildFrameDebugInfo (Function &F, coro::Shape &Shape, FrameDataInfo &FrameData) |
Build artificial debug info for C++ coroutine frames to allow users to inspect the contents of the frame directly. More... | |
static StructType * | buildFrameType (Function &F, coro::Shape &Shape, FrameDataInfo &FrameData) |
static Instruction * | splitBeforeCatchSwitch (CatchSwitchInst *CatchSwitch) |
static void | createFramePtr (coro::Shape &Shape) |
static void | insertSpills (const FrameDataInfo &FrameData, coro::Shape &Shape) |
static void | movePHIValuesToInsertedBlock (BasicBlock *SuccBB, BasicBlock *InsertedBB, BasicBlock *PredBB, PHINode *UntilPHI=nullptr) |
static void | rewritePHIsForCleanupPad (BasicBlock *CleanupPadBB, CleanupPadInst *CleanupPad) |
static void | cleanupSinglePredPHIs (Function &F) |
static void | rewritePHIs (BasicBlock &BB) |
static void | rewritePHIs (Function &F) |
static bool | materializable (Instruction &V) |
static bool | isCoroutineStructureIntrinsic (Instruction &I) |
static void | rewriteMaterializableInstructions (IRBuilder<> &IRB, const SpillInfo &Spills) |
static BasicBlock * | splitBlockIfNotFirst (Instruction *I, const Twine &Name) |
static void | splitAround (Instruction *I, const Twine &Name) |
static bool | isSuspendBlock (BasicBlock *BB) |
static bool | isSuspendReachableFrom (BasicBlock *From, VisitedBlocksSet &VisitedOrFreeBBs) |
Does control flow starting at the given block ever reach a suspend instruction before reaching a block in VisitedOrFreeBBs? More... | |
static bool | isLocalAlloca (CoroAllocaAllocInst *AI) |
Is the given alloca "local", i.e. More... | |
static bool | willLeaveFunctionImmediatelyAfter (BasicBlock *BB, unsigned depth=3) |
After we split the coroutine, will the given basic block be along an obvious exit path for the resumption function? More... | |
static bool | localAllocaNeedsStackSave (CoroAllocaAllocInst *AI) |
static void | lowerLocalAllocas (ArrayRef< CoroAllocaAllocInst * > LocalAllocas, SmallVectorImpl< Instruction * > &DeadInsts) |
Turn each of the given local allocas into a normal (dynamic) alloca instruction. More... | |
static Instruction * | lowerNonLocalAlloca (CoroAllocaAllocInst *AI, coro::Shape &Shape, SmallVectorImpl< Instruction * > &DeadInsts) |
Turn the given coro.alloca.alloc call into a dynamic allocation. More... | |
static Value * | emitGetSwiftErrorValue (IRBuilder<> &Builder, Type *ValueTy, coro::Shape &Shape) |
Get the current swifterror value. More... | |
static Value * | emitSetSwiftErrorValue (IRBuilder<> &Builder, Value *V, coro::Shape &Shape) |
Set the given value as the current swifterror value. More... | |
static Value * | emitSetAndGetSwiftErrorValueAround (Instruction *Call, AllocaInst *Alloca, coro::Shape &Shape) |
Set the swifterror value from the given alloca before a call, then put in back in the alloca afterwards. More... | |
static void | eliminateSwiftErrorAlloca (Function &F, AllocaInst *Alloca, coro::Shape &Shape) |
Eliminate a formerly-swifterror alloca by inserting the get/set intrinsics and attempting to MemToReg the alloca away. More... | |
static void | eliminateSwiftErrorArgument (Function &F, Argument &Arg, coro::Shape &Shape, SmallVectorImpl< AllocaInst * > &AllocasToPromote) |
"Eliminate" a swifterror argument by reducing it to the alloca case and then loading and storing in the prologue and epilog. More... | |
static void | eliminateSwiftError (Function &F, coro::Shape &Shape) |
Eliminate all problematic uses of swifterror arguments and allocas from the function. More... | |
static void | sinkSpillUsesAfterCoroBegin (Function &F, const FrameDataInfo &FrameData, CoroBeginInst *CoroBegin) |
retcon and retcon.once conventions assume that all spill uses can be sunk after the coro.begin intrinsic. More... | |
static void | sinkLifetimeStartMarkers (Function &F, coro::Shape &Shape, SuspendCrossingInfo &Checker) |
For each local variable that all of its user are only used inside one of suspended region, we sink their lifetime.start markers to the place where after the suspend block. More... | |
static void | collectFrameAllocas (Function &F, coro::Shape &Shape, const SuspendCrossingInfo &Checker, SmallVectorImpl< AllocaInfo > &Allocas) |
#define DEBUG_TYPE "coro-suspend-crossing" |
Definition at line 297 of file CoroFrame.cpp.
#define DEBUG_TYPE "coro-frame" |
Definition at line 297 of file CoroFrame.cpp.
typedef SmallPtrSet<BasicBlock*, 8> VisitedBlocksSet |
Definition at line 2085 of file CoroFrame.cpp.
anonymous enum |
Enumerator | |
---|---|
SmallVectorThreshold |
Definition at line 47 of file CoroFrame.cpp.
|
static |
Build artificial debug info for C++ coroutine frames to allow users to inspect the contents of the frame directly.
Create Debug information for coroutine frame with debug name "__coro_frame". The debug information for the fields of coroutine frame is constructed from the following way:
FIXME: If we fill the field SizeInBits
with the actual size of __coro_index in bits, then __coro_index wouldn't show in the debugger.
Definition at line 950 of file CoroFrame.cpp.
References llvm::coro::Shape::ABI, assert(), cacheDIVar(), llvm::DIBuilder::createAutoVariable(), llvm::DIBuilder::createBasicType(), llvm::DIBuilder::createExpression(), llvm::DIBuilder::createMemberType(), llvm::DIBuilder::createPointerType(), llvm::DIBuilder::createStructType(), llvm::TinyPtrVector< EltTy >::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::end(), F, llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::find(), llvm::FindDbgDeclareUses(), llvm::coro::Shape::FrameAlign, llvm::coro::Shape::FramePtr, llvm::coro::Shape::FrameSize, llvm::coro::Shape::FrameTy, llvm::TinyPtrVector< EltTy >::front(), get, llvm::DebugLoc::get(), llvm::Instruction::getDebugLoc(), llvm::StructType::getElementType(), llvm::DIScope::getFile(), llvm::TypeSize::getFixedSize(), llvm::coro::Shape::getInsertPtAfterFramePtr(), llvm::DIVariable::getLine(), llvm::DIType::getName(), llvm::StructType::getNumElements(), llvm::DIBuilder::getOrCreateArray(), llvm::coro::Shape::getPromiseAlloca(), llvm::DILocalVariable::getScope(), llvm::DataLayout::getTypeSizeInBits(), llvm::DbgVariableIntrinsic::getVariable(), Index, llvm::coro::Shape::SwitchLoweringStorage::IndexAlign, llvm::coro::Shape::SwitchLoweringStorage::IndexField, llvm::coro::Shape::SwitchLoweringStorage::IndexOffset, llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::insert(), llvm::dwarf::isCPlusPlus(), llvm::Type::isSized(), llvm::DIBuilder::replaceArrays(), solveDIType(), llvm::StringRef::str(), llvm::Twine::str(), llvm::coro::Shape::SwitchLowering, llvm::to_string(), and llvm::Align::value().
|
static |
Definition at line 1123 of file CoroFrame.cpp.
References A, llvm::coro::Shape::ABI, alignTo(), assert(), llvm::coro::Shape::AsyncLowering, B, llvm::coro::Shape::AsyncLoweringStorage::ContextHeaderSize, llvm::coro::Shape::AsyncLoweringStorage::ContextSize, llvm::coro::Shape::CoroSuspends, DL, F, llvm::coro::Shape::FrameAlign, llvm::coro::Shape::AsyncLoweringStorage::FrameOffset, llvm::coro::Shape::FrameSize, get, llvm::coro::Shape::AsyncLoweringStorage::getContextAlignment(), llvm::Type::getPointerTo(), llvm::coro::Shape::getPromiseAlloca(), llvm::coro::Shape::getRetconCoroId(), llvm::coro::Shape::SwitchLoweringStorage::IndexAlign, llvm::coro::Shape::SwitchLoweringStorage::IndexField, llvm::coro::Shape::SwitchLoweringStorage::IndexOffset, llvm::coro::Shape::RetconLoweringStorage::IsFrameInlineInStorage, llvm::Log2_64_Ceil(), llvm::max(), llvm::None, llvm::report_fatal_error(), llvm::coro::Shape::RetconLowering, S, and llvm::coro::Shape::SwitchLowering.
|
static |
Definition at line 799 of file CoroFrame.cpp.
References llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::find(), llvm::find_if(), llvm::FindDbgDeclareUses(), llvm::DbgVariableIntrinsic::getExpression(), I, and llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::insert().
Referenced by buildFrameDebugInfo().
|
static |
Definition at line 1910 of file CoroFrame.cpp.
References BB, F, llvm::PHINode::getIncomingValue(), llvm::SmallVectorImpl< T >::pop_back_val(), and llvm::Value::replaceAllUsesWith().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 2526 of file CoroFrame.cpp.
References llvm::coro::Shape::ABI, llvm::coro::Shape::CoroBegin, llvm::SmallVectorImpl< T >::emplace_back(), F, I, instructions, llvm::coro::Shape::SwitchLoweringStorage::PromiseAlloca, and llvm::coro::Shape::SwitchLowering.
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 1520 of file CoroFrame.cpp.
References Builder, llvm::coro::Shape::CoroBegin, llvm::coro::Shape::FramePtr, llvm::coro::Shape::FrameTy, llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), and llvm::Type::getPointerTo().
|
static |
Definition at line 408 of file CoroFrame.cpp.
References A, and llvm::dbgs().
Referenced by llvm::coro::buildCoroutineFrame().
Definition at line 398 of file CoroFrame.cpp.
References llvm::dbgs(), E, and I.
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Eliminate all problematic uses of swifterror arguments and allocas from the function.
We'll fix them up later when splitting the function.
Definition at line 2361 of file CoroFrame.cpp.
References Arg, eliminateSwiftErrorAlloca(), eliminateSwiftErrorArgument(), F, llvm::AllocaInst::isSwiftError(), llvm::PromoteMemToReg(), and llvm::AllocaInst::setSwiftError().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Eliminate a formerly-swifterror alloca by inserting the get/set intrinsics and attempting to MemToReg the alloca away.
Definition at line 2295 of file CoroFrame.cpp.
References Addr, assert(), llvm::MCID::Call, emitSetAndGetSwiftErrorValueAround(), llvm::Use::getUser(), llvm::isAllocaPromotable(), llvm::make_early_inc_range(), llvm::Use::set(), and llvm::Value::uses().
Referenced by eliminateSwiftError().
|
static |
"Eliminate" a swifterror argument by reducing it to the alloca case and then loading and storing in the prologue and epilog.
The argument keeps the swifterror flag.
Definition at line 2321 of file CoroFrame.cpp.
References Arg, Builder, llvm::coro::Shape::CoroSuspends, emitSetAndGetSwiftErrorValueAround(), and F.
Referenced by eliminateSwiftError().
|
static |
Get the current swifterror value.
Definition at line 2232 of file CoroFrame.cpp.
References Builder, llvm::MCID::Call, get, and llvm::coro::Shape::SwiftErrorOps.
Referenced by emitSetAndGetSwiftErrorValueAround().
|
static |
Set the swifterror value from the given alloca before a call, then put in back in the alloca afterwards.
Returns an address that will stand in for the swifterror slot until splitting.
Definition at line 2265 of file CoroFrame.cpp.
References Addr, Builder, llvm::MCID::Call, emitGetSwiftErrorValue(), emitSetSwiftErrorValue(), and llvm::AllocaInst::getAllocatedType().
Referenced by eliminateSwiftErrorAlloca(), and eliminateSwiftErrorArgument().
|
static |
Set the given value as the current swifterror value.
Returns a slot that can be used as a swifterror slot.
Definition at line 2247 of file CoroFrame.cpp.
References Builder, llvm::MCID::Call, get, llvm::Type::getPointerTo(), llvm::Value::getType(), and llvm::coro::Shape::SwiftErrorOps.
Referenced by emitSetAndGetSwiftErrorValueAround().
|
static |
Definition at line 1551 of file CoroFrame.cpp.
References A, llvm::coro::Shape::ABI, Align, llvm::coro::Shape::AllocaSpillBlock, Arg, assert(), Builder, llvm::SmallVectorImpl< T >::clear(), llvm::coro::Shape::CoroBegin, llvm::tgtok::Def, llvm::DominatorTree::dominates(), E, llvm::Instruction::eraseFromParent(), llvm::FindDbgDeclareUses(), llvm::findDbgUsers(), FramePtr, llvm::coro::Shape::FramePtr, llvm::coro::Shape::FrameTy, llvm::BasicBlock::front(), G, GEP, get, llvm::AllocaInst::getAlign(), llvm::AllocaInst::getAllocatedType(), llvm::AllocaInst::getArraySize(), llvm::Value::getContext(), llvm::StructType::getElementType(), llvm::BasicBlock::getFirstInsertionPt(), llvm::BasicBlock::getFirstNonPHI(), llvm::Instruction::getFunction(), llvm::coro::Shape::getInsertPtAfterFramePtr(), llvm::Instruction::getModule(), llvm::Value::getName(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getSingleSuccessor(), llvm::BasicBlock::getTerminator(), llvm::AllocaInst::getType(), I, llvm::AllocaInst::isArrayAllocation(), M, llvm::coro::Shape::OptimizeFrame, P, llvm::Value::replaceAllUsesWith(), llvm::User::replaceUsesOfWith(), llvm::report_fatal_error(), llvm::salvageDebugInfo(), llvm::BasicBlock::splitBasicBlock(), splitBeforeCatchSwitch(), llvm::SplitEdge(), llvm::Value::users(), and llvm::Align::value().
|
static |
Definition at line 2018 of file CoroFrame.cpp.
References I.
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Is the given alloca "local", i.e.
bounded in lifetime to not cross a suspend point?
Definition at line 2112 of file CoroFrame.cpp.
References llvm::Instruction::getParent(), llvm::SmallPtrSetImpl< PtrType >::insert(), isSuspendReachableFrom(), and llvm::Value::users().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 2081 of file CoroFrame.cpp.
References BB.
Referenced by isSuspendReachableFrom(), sinkLifetimeStartMarkers(), and willLeaveFunctionImmediatelyAfter().
|
static |
Does control flow starting at the given block ever reach a suspend instruction before reaching a block in VisitedOrFreeBBs?
Definition at line 2089 of file CoroFrame.cpp.
References From, llvm::SmallPtrSetImpl< PtrType >::insert(), isSuspendBlock(), and llvm::successors().
Referenced by isLocalAlloca().
|
static |
Definition at line 2145 of file CoroFrame.cpp.
References llvm::Value::users(), and willLeaveFunctionImmediatelyAfter().
Referenced by lowerLocalAllocas().
|
static |
Turn each of the given local allocas into a normal (dynamic) alloca instruction.
Definition at line 2163 of file CoroFrame.cpp.
References Builder, llvm::Intrinsic::getDeclaration(), llvm::Instruction::getModule(), localAllocaNeedsStackSave(), M, llvm::Value::replaceAllUsesWith(), llvm::AllocaInst::setAlignment(), and llvm::Value::users().
|
static |
Turn the given coro.alloca.alloc call into a dynamic allocation.
This happens during the all-instructions iteration, so it must not delete the call.
Definition at line 2207 of file CoroFrame.cpp.
References Builder, llvm::coro::Shape::emitAlloc(), llvm::coro::Shape::emitDealloc(), llvm::CoroAllocaAllocInst::getSize(), llvm::Value::replaceAllUsesWith(), and llvm::Value::users().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 2011 of file CoroFrame.cpp.
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 1817 of file CoroFrame.cpp.
References llvm::PHINode::addIncoming(), llvm::BasicBlock::front(), llvm::Value::getName(), and llvm::Value::getType().
Referenced by rewritePHIs(), and rewritePHIsForCleanupPad().
|
static |
Definition at line 2025 of file CoroFrame.cpp.
References assert(), llvm::Instruction::clone(), llvm::tgtok::Def, E, llvm::Instruction::getParent(), llvm::BasicBlock::getSinglePredecessor(), llvm::Instruction::insertBefore(), llvm::User::replaceUsesOfWith(), and llvm::Value::setName().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 1927 of file CoroFrame.cpp.
References assert(), BB, llvm::ehAwareSplitEdge(), llvm::Instruction::eraseFromParent(), llvm::Value::getType(), movePHIValuesToInsertedBlock(), llvm::predecessors(), llvm::Value::replaceAllUsesWith(), rewritePHIsForCleanupPad(), and llvm::Value::takeName().
Referenced by llvm::coro::buildCoroutineFrame(), and rewritePHIs().
|
static |
Definition at line 1997 of file CoroFrame.cpp.
References BB, F, and rewritePHIs().
|
static |
Definition at line 1835 of file CoroFrame.cpp.
References Builder, get, llvm::BasicBlock::getContext(), llvm::Value::getName(), llvm::BasicBlock::getParent(), llvm::Instruction::insertAfter(), movePHIValuesToInsertedBlock(), llvm::pred_size(), llvm::predecessors(), llvm::Instruction::removeFromParent(), llvm::setUnwindEdgeTo(), and llvm::updatePhiNodes().
Referenced by rewritePHIs().
|
static |
For each local variable that all of its user are only used inside one of suspended region, we sink their lifetime.start markers to the place where after the suspend block.
Doing so minimizes the lifetime of each variable, hence minimizing the amount of data we end up putting on the frame.
Definition at line 2441 of file CoroFrame.cpp.
References assert(), llvm::coro::Shape::CoroSuspends, llvm::DominatorTree::dominates(), F, llvm::IntrinsicInst::getIntrinsicID(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::BasicBlock::getSingleSuccessor(), llvm::Value::hasOneUse(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), instructions, isLifetimeStart(), isSuspendBlock(), S, llvm::Value::stripPointerCasts(), llvm::Instruction::user_back(), and llvm::Value::users().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
retcon and retcon.once conventions assume that all spill uses can be sunk after the coro.begin intrinsic.
Definition at line 2394 of file CoroFrame.cpp.
References A, B, llvm::SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > >::begin(), llvm::tgtok::Def, llvm::DominatorTree::dominates(), llvm::SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > >::end(), F, llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), llvm::Instruction::getParent(), llvm::SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > >::insert(), llvm::Instruction::moveBefore(), llvm::SmallVectorImpl< T >::pop_back_val(), and llvm::sort().
|
static |
Definition at line 864 of file CoroFrame.cpp.
References assert(), llvm::BitWidth, Builder, llvm::dbgs(), llvm::DataLayout::getABITypeAlignment(), llvm::DIType::getAlignInBits(), llvm::StructLayout::getElementOffsetInBits(), llvm::DIType::getName(), llvm::DataLayout::getPrefTypeAlign(), llvm::DataLayout::getPrefTypeAlignment(), llvm::DIType::getSizeInBits(), llvm::DataLayout::getStructLayout(), llvm::DataLayout::getTypeSizeInBits(), I, llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::insert(), llvm::Type::isFloatingPointTy(), llvm::Type::isIntegerTy(), llvm::Type::isPointerTy(), llvm::Type::isStructTy(), LLVM_DEBUG, llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::lookup(), llvm::None, llvm::Check::Size, solveTypeName(), and llvm::Align::value().
Referenced by buildFrameDebugInfo().
Create name for Type.
It uses MDString to store new created string to avoid memory leak.
Definition at line 816 of file CoroFrame.cpp.
References get, llvm::Type::getContext(), llvm::Type::getNonOpaquePointerElementType(), llvm::Type::getStructName(), llvm::Type::isDoubleTy(), llvm::Type::isFloatingPointTy(), llvm::Type::isFloatTy(), llvm::Type::isIntegerTy(), llvm::Type::isStructTy(), llvm::SmallString< InternalLen >::str(), llvm::raw_svector_ostream::str(), and llvm::Twine::toStringRef().
Referenced by solveDIType().
|
static |
Definition at line 2076 of file CoroFrame.cpp.
References I, and splitBlockIfNotFirst().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 1508 of file CoroFrame.cpp.
References llvm::Instruction::eraseFromParent(), llvm::Instruction::getParent(), llvm::CatchSwitchInst::getParentPad(), llvm::BasicBlock::getTerminator(), and llvm::BasicBlock::splitBasicBlock().
Referenced by insertSpills().
|
static |
|
static |
After we split the coroutine, will the given basic block be along an obvious exit path for the resumption function?
Definition at line 2126 of file CoroFrame.cpp.
References BB, isSuspendBlock(), and llvm::successors().
Referenced by localAllocaNeedsStackSave().