LLVM  4.0.0
Classes | Macros | Typedefs | Enumerations | Functions
CoroFrame.cpp File Reference
#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"
Include dependency graph for CoroFrame.cpp:

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 StructTypebuildFrameType (Function &F, coro::Shape &Shape, SpillInfo &Spills)
 
static InstructioninsertSpills (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 BasicBlocksplitBlockIfNotFirst (Instruction *I, const Twine &Name)
 
static void splitAround (Instruction *I, const Twine &Name)
 

Macro Definition Documentation

#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.

Typedef Documentation

Definition at line 280 of file CoroFrame.cpp.

Enumeration Type Documentation

anonymous enum
Enumerator
SmallVectorThreshold 

Definition at line 38 of file CoroFrame.cpp.

Function Documentation

static StructType* buildFrameType ( Function F,
coro::Shape Shape,
SpillInfo Spills 
)
static
static void dump ( StringRef  Title,
SpillInfo const Spills 
)
static

Definition at line 283 of file CoroFrame.cpp.

References llvm::dbgs(), llvm::Value::dump(), and E.

Referenced by llvm::coro::buildCoroutineFrame().

static Instruction* insertSpills ( SpillInfo Spills,
coro::Shape Shape 
)
static
static bool isCoroutineStructureIntrinsic ( Instruction I)
static

Definition at line 541 of file CoroFrame.cpp.

References I.

Referenced by llvm::coro::buildCoroutineFrame().

static bool materializable ( Instruction V)
static

Definition at line 534 of file CoroFrame.cpp.

Referenced by llvm::coro::buildCoroutineFrame().

static void moveSpillUsesAfterCoroBegin ( Function F,
SpillInfo const Spills,
CoroBeginInst CoroBegin 
)
static
static void rewriteMaterializableInstructions ( IRBuilder<> &  IRB,
SpillInfo const Spills 
)
static
static void rewritePHIs ( BasicBlock BB)
static
static void rewritePHIs ( Function F)
static
static void splitAround ( Instruction I,
const Twine Name 
)
static
static BasicBlock* splitBlockIfNotFirst ( Instruction I,
const Twine Name 
)
static