|
LLVM
4.0.0
|
#include "CoroInternal.h"#include "llvm/ADT/BitVector.h"#include "llvm/IR/CFG.h"#include "llvm/IR/Dominators.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/InstIterator.h"#include "llvm/Support/Debug.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/circular_raw_ostream.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/Local.h"Go to the source code of this file.
Classes | |
| struct | Spill |
Macros | |
| #define | DEBUG_TYPE "coro-suspend-crossing" |
| #define | DEBUG_TYPE "coro-frame" |
Typedefs | |
| using | SpillInfo = SmallVector< Spill, 8 > |
Enumerations | |
| enum | { SmallVectorThreshold = 32 } |
Functions | |
| static void | dump (StringRef Title, SpillInfo const &Spills) |
| static StructType * | buildFrameType (Function &F, coro::Shape &Shape, SpillInfo &Spills) |
| static Instruction * | insertSpills (SpillInfo &Spills, coro::Shape &Shape) |
| 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, SpillInfo const &Spills) |
| static void | moveSpillUsesAfterCoroBegin (Function &F, SpillInfo const &Spills, CoroBeginInst *CoroBegin) |
| static BasicBlock * | splitBlockIfNotFirst (Instruction *I, const Twine &Name) |
| static void | splitAround (Instruction *I, const Twine &Name) |
| #define DEBUG_TYPE "coro-suspend-crossing" |
Definition at line 257 of file CoroFrame.cpp.
| #define DEBUG_TYPE "coro-frame" |
Definition at line 257 of file CoroFrame.cpp.
| using SpillInfo = SmallVector<Spill, 8> |
Definition at line 280 of file CoroFrame.cpp.
| anonymous enum |
| Enumerator | |
|---|---|
| SmallVectorThreshold | |
Definition at line 38 of file CoroFrame.cpp.
|
static |
Definition at line 305 of file CoroFrame.cpp.
References C, llvm::coro::Shape::CoroSuspends, llvm::Function::getContext(), llvm::PointerType::getElementType(), llvm::Value::getName(), llvm::Type::getPointerTo(), llvm::AllocaInst::getType(), llvm::Value::getType(), llvm::Log2_64_Ceil(), llvm::coro::Shape::PromiseAlloca, and llvm::StructType::setBody().
Referenced by llvm::coro::buildCoroutineFrame().
Definition at line 283 of file CoroFrame.cpp.
References llvm::dbgs(), llvm::Value::dump(), and E.
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 370 of file CoroFrame.cpp.
References llvm::coro::Shape::AllocaSpillBlock, assert(), llvm::coro::Shape::CoroBegin, llvm::dyn_cast(), E, llvm::SmallVectorImpl< T >::emplace_back(), FramePtr, llvm::coro::Shape::FrameTy, llvm::BasicBlock::front(), G, llvm::BasicBlock::getFirstInsertionPt(), llvm::Value::getName(), llvm::Type::getPointerTo(), P, llvm::coro::Shape::PromiseAlloca, llvm::report_fatal_error(), and llvm::BasicBlock::splitBasicBlock().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 541 of file CoroFrame.cpp.
References I.
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 534 of file CoroFrame.cpp.
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 594 of file CoroFrame.cpp.
References llvm::dbgs(), DEBUG, llvm::DominatorTree::dominates(), E, llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), llvm::Instruction::moveBefore(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::report_fatal_error(), and llvm::Value::users().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 548 of file CoroFrame.cpp.
References assert(), E, llvm::BasicBlock::getFirstInsertionPt(), llvm::Value::getName(), llvm::Instruction::insertBefore(), and llvm::Value::setName().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 480 of file CoroFrame.cpp.
References llvm::PHINode::addIncoming(), llvm::dyn_cast(), llvm::StringRef::front(), llvm::BasicBlock::front(), llvm::Value::getName(), llvm::Value::getType(), llvm::pred_begin(), llvm::pred_end(), and llvm::SplitEdge().
Referenced by llvm::coro::buildCoroutineFrame(), and rewritePHIs().
|
static |
Definition at line 520 of file CoroFrame.cpp.
References llvm::BasicBlock::front(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and rewritePHIs().
|
static |
Definition at line 645 of file CoroFrame.cpp.
References llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), and splitBlockIfNotFirst().
Referenced by llvm::coro::buildCoroutineFrame().
|
static |
Definition at line 632 of file CoroFrame.cpp.
References llvm::BasicBlock::front(), llvm::Instruction::getParent(), llvm::BasicBlock::getSinglePredecessor(), I, llvm::Value::setName(), and llvm::BasicBlock::splitBasicBlock().
Referenced by splitAround().
1.8.6