14#ifndef LLVM_TRANSFORMS_COROUTINES_SUSPENDCROSSINGINFO_H
15#define LLVM_TRANSFORMS_COROUTINES_SUSPENDCROSSINGINFO_H
50 bool KillLoop =
false;
54 bool AlwaysKill =
false;
55 bool NeverKill =
false;
58 bool isAlwaysKill()
const {
return AlwaysKill; }
59 bool isNeverKill()
const {
return NeverKill; }
60 void setAlwaysKill() {
76 template <
bool Initialize = false>
80#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
108 if (PN->getNumIncomingValues() > 1)
118 assert(UseBB &&
"should have split coro.suspend into its own block");
129 auto *DefBB =
I.getParent();
135 DefBB = DefBB->getSingleSuccessor();
136 assert(DefBB &&
"should have split coro.suspend into its own block");
149 "Coroutine could only collect Argument and Instruction now.");
164 "Coroutine could only collect Argument and Instruction now.");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file implements the BitVector class.
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file builds on the ADT/GraphTraits.h file to build a generic graph post order iterator.
This file defines the SmallVector class.
This class represents an incoming formal argument to a Function.
LLVM Basic Block Representation.
LLVM_ABI const BasicBlock * getSinglePredecessor() const
Return the predecessor of this block if it has a single predecessor block.
Manage lifetime of a slot tracker for printing IR.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
bool isDefinitionAcrossSuspend(Value &V) const
bool isDefinitionAcrossSuspend(Value &V, User *U) const
bool isDefinitionAcrossSuspend(BasicBlock *DefBB, User *U) const
LLVM_ABI bool hasPathCrossingSuspendPoint(BasicBlock *From, BasicBlock *To) const
Returns true if there is a path from From to To crossing a suspend point without crossing From a 2nd ...
bool isDefinitionAcrossSuspend(Instruction &I, User *U) const
LLVM_ABI bool hasPathOrLoopCrossingSuspendPoint(BasicBlock *From, BasicBlock *To) const
Returns true if there is a path from From to To crossing a suspend point without crossing From a 2nd ...
LLVM_ABI SuspendCrossingInfo(Function &F, const coro::Shape &Shape)
bool isDefinitionAcrossSuspend(Argument &A, User *U) const
LLVM Value Representation.
iterator_range< user_iterator > users()
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.