LLVM  5.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 StructType * buildFrameType (Function &F, coro::Shape &Shape, SpillInfo &Spills)
 
static Instruction * splitBeforeCatchSwitch (CatchSwitchInst *CatchSwitch)
 
static Instruction * insertSpills (SpillInfo &Spills, coro::Shape &Shape)
 
static void setUnwindEdgeTo (TerminatorInst *TI, BasicBlock *Succ)
 
static void updatePhiNodes (BasicBlock *DestBB, BasicBlock *OldPred, BasicBlock *NewPred, PHINode *LandingPadReplacement)
 
static BasicBlock * ehAwareSplitEdge (BasicBlock *BB, BasicBlock *Succ, LandingPadInst *OriginalPad, PHINode *LandingPadReplacement)
 
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)
 

Macro Definition Documentation

#define DEBUG_TYPE   "coro-suspend-crossing"

Definition at line 259 of file CoroFrame.cpp.

#define DEBUG_TYPE   "coro-frame"

Definition at line 259 of file CoroFrame.cpp.

Typedef Documentation

Definition at line 282 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 285 of file CoroFrame.cpp.

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

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

static BasicBlock* ehAwareSplitEdge ( BasicBlock *  BB,
BasicBlock *  Succ,
LandingPadInst *  OriginalPad,
PHINode *  LandingPadReplacement 
)
static
static Instruction* insertSpills ( SpillInfo &  Spills,
coro::Shape &  Shape 
)
static
static bool isCoroutineStructureIntrinsic ( Instruction &  I)
static

Definition at line 675 of file CoroFrame.cpp.

References I.

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

static bool materializable ( Instruction &  V)
static

Definition at line 668 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 setUnwindEdgeTo ( TerminatorInst *  TI,
BasicBlock *  Succ 
)
static

Definition at line 523 of file CoroFrame.cpp.

References llvm_unreachable().

Referenced by ehAwareSplitEdge().

static void splitAround ( Instruction *  I,
const Twine &  Name 
)
static
static Instruction* splitBeforeCatchSwitch ( CatchSwitchInst *  CatchSwitch)
static
static BasicBlock* splitBlockIfNotFirst ( Instruction *  I,
const Twine &  Name 
)
static
static void updatePhiNodes ( BasicBlock *  DestBB,
BasicBlock *  OldPred,
BasicBlock *  NewPred,
PHINode *  LandingPadReplacement 
)
static