59 raw_ostream &operator<< (raw_ostream &OS, const Print<RegisterRef> &
P) {
60 auto &
TRI =
P.G.getTRI();
61 if (
P.Obj.Reg > 0 &&
P.Obj.Reg <
TRI.getNumRegs())
62 OS <<
TRI.getName(
P.Obj.Reg);
64 OS <<
'#' <<
P.Obj.Reg;
70 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeId> &
P) {
72 uint16_t
Attrs = NA.Addr->getAttrs();
82 default: OS <<
"c?";
break;
98 default: OS <<
"r?";
break;
113 OS << Print<NodeId>(RA.
Id,
G) <<
'<' 120 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<DefNode*>> &
P) {
123 if (
NodeId N =
P.Obj.Addr->getReachingDef())
126 if (
NodeId N =
P.Obj.Addr->getReachedDef())
129 if (
NodeId N =
P.Obj.Addr->getReachedUse())
132 if (
NodeId N =
P.Obj.Addr->getSibling())
138 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<UseNode*>> &
P) {
141 if (
NodeId N =
P.Obj.Addr->getReachingDef())
144 if (
NodeId N =
P.Obj.Addr->getSibling())
154 if (
NodeId N =
P.Obj.Addr->getReachingDef())
157 if (
NodeId N =
P.Obj.Addr->getPredecessor())
160 if (
NodeId N =
P.Obj.Addr->getSibling())
166 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<RefNode*>> &
P) {
167 switch (
P.Obj.Addr->getKind()) {
169 OS << PrintNode<DefNode*>(
P.Obj,
P.G);
175 OS << PrintNode<UseNode*>(
P.Obj,
P.G);
183 unsigned N =
P.Obj.size();
184 for (
auto I :
P.Obj) {
185 OS << Print<NodeId>(
I.Id,
P.G);
194 unsigned N =
P.Obj.size();
195 for (
auto I :
P.Obj) {
196 OS << Print<NodeId>(
I,
P.G);
205 template <
typename T>
214 template <
typename T>
215 raw_ostream &operator<< (raw_ostream &OS, const PrintListV<T> &
P) {
216 unsigned N =
P.List.size();
218 OS << PrintNode<T>(A,
P.G);
228 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<PhiNode*>> &
P) {
229 OS << Print<NodeId>(
P.Obj.Id,
P.G) <<
": phi [" 230 << PrintListV<RefNode*>(
P.Obj.Addr->members(
P.G),
P.G) <<
']';
239 OS << Print<NodeId>(
P.Obj.Id,
P.G) <<
": " <<
P.G.getTII().getName(Opc);
245 return Op.isMBB() ||
Op.isGlobal() ||
Op.isSymbol();
257 OS <<
" [" << PrintListV<RefNode*>(
P.Obj.Addr->members(
P.G),
P.G) <<
']';
264 switch (
P.Obj.Addr->getKind()) {
266 OS << PrintNode<PhiNode*>(
P.Obj,
P.G);
269 OS << PrintNode<StmtNode*>(
P.Obj,
P.G);
284 auto PrintBBs = [&OS] (std::vector<int> Ns) ->
void {
285 unsigned N = Ns.size();
294 <<
" --- preds(" << NP <<
"): ";
296 Ns.push_back(
B->getNumber());
300 OS <<
" succs(" << NS <<
"): ";
303 Ns.push_back(
B->getNumber());
307 for (
auto I :
P.Obj.Addr->members(
P.G))
316 <<
P.Obj.Addr->getCode()->getName() <<
'\n';
317 for (
auto I :
P.Obj.Addr->members(
P.G))
324 raw_ostream &operator<< (raw_ostream &OS, const Print<RegisterSet> &
P) {
327 OS << ' ' << Print<RegisterRef>(
I,
P.G);
333 raw_ostream &operator<< (raw_ostream &OS, const Print<RegisterAggr> &
P) {
342 OS << Print<NodeId>(
I->Id, P.
G)
363 void NodeAllocator::startNewBlock() {
364 void *
T = MemPool.Allocate(NodesPerBlock*NodeMemSize, NodeMemSize);
365 char *
P =
static_cast<char*
>(
T);
370 assert((Blocks.size() < ((size_t)1 << (8*
sizeof(
NodeId)-BitsPerIndex))) &&
371 "Out of bits for block index");
375 bool NodeAllocator::needNewBlock() {
379 char *ActiveBegin = Blocks.back();
381 return Index >= NodesPerBlock;
391 makeId(ActiveB, Index) };
392 ActiveEnd += NodeMemSize;
397 uintptr_t A =
reinterpret_cast<uintptr_t
>(
P);
398 for (
unsigned i = 0, n = Blocks.size(); i != n; ++i) {
399 uintptr_t
B =
reinterpret_cast<uintptr_t
>(Blocks[i]);
400 if (A < B || A >= B + NodesPerBlock*NodeMemSize)
403 return makeId(i, Idx);
456 while (NA.
Addr !=
this) {
480 if (Code.FirstM == 0)
509 if (Code.LastM == MA.
Id)
519 if (MA.
Id == NA.
Id) {
520 if (Code.LastM == MA.
Id) {
522 Code.FirstM = Code.LastM = 0;
530 while (MA.
Addr !=
this) {
536 if (Code.LastM == NA.
Id)
548 return members_if(True, G);
555 while (NA.
Addr !=
this) {
589 addMemberAfter(M, PA, G);
609 return findBlock(EntryB, G);
643 if (
O.isGlobal() ||
O.isSymbol())
673 : MF(mf),
TII(tii),
TRI(tri), PRI(tri, mf), MDT(mdt), MDF(mdf), TOI(toi),
691 Pos =
DS.Stack.size();
692 while (Pos > 0 &&
DS.isDelimiter(
DS.Stack[Pos-1]))
699 for (
auto I = top(),
E = bottom();
I !=
E;
I.down())
709 unsigned P = nextDown(Stack.size());
724 unsigned P = Stack.size();
726 bool Found = isDelimiter(Stack[P-1], N);
736 unsigned DataFlowGraph::DefStack::nextUp(
unsigned P)
const {
739 unsigned SS = Stack.size();
744 IsDelim = isDelimiter(Stack[P-1]);
745 }
while (P < SS && IsDelim);
751 unsigned DataFlowGraph::DefStack::nextDown(
unsigned P)
const {
754 assert(P > 0 && P <= Stack.size());
755 bool IsDelim = isDelimiter(Stack[P-1]);
759 IsDelim = isDelimiter(Stack[P-1]);
760 }
while (P > 0 && IsDelim);
767 RegisterSet DataFlowGraph::getLandingPadLiveIns()
const {
894 BlockNodes.insert(std::make_pair(&B, BA));
896 if (
I.isDebugInstr())
903 NodeList Blocks = Func.Addr->members(*
this);
910 AllRefs.insert(
RA.Addr->getRegRef(*
this));
916 for (std::pair<unsigned,unsigned> P : MRI.
liveins())
939 if (!EHRegs.empty()) {
970 recordDefsForDF(PhiM, BA);
972 buildPhis(PhiM, AllRefs, BA);
976 linkBlockRefs(DM, EA);
1011 if (PRI.
alias(AR, BR))
1019 for (
auto I = DefM.begin(),
E = DefM.end();
I !=
E; ++
I)
1020 I->second.start_block(B);
1028 for (
auto I = DefM.begin(),
E = DefM.end();
I !=
E; ++
I)
1029 I->second.clear_block(B);
1032 for (
auto I = DefM.begin(),
E = DefM.end(), NextI =
I;
I !=
E;
I = NextI) {
1033 NextI = std::next(
I);
1035 if (
I->second.empty())
1043 pushClobbers(IA, DefM);
1051 std::set<RegisterId> Defined;
1066 if (Visited.count(DA.Id))
1077 DefM[RR.
Reg].push(DA);
1078 Defined.insert(RR.
Reg);
1082 if (!Defined.count(A))
1087 Visited.insert(
T.Id);
1096 std::set<RegisterId> Defined;
1112 if (Visited.count(DA.Id))
1123 if (!Defined.insert(RR.
Reg).second) {
1125 dbgs() <<
"Multiple definitions of register: " 1133 DefM[RR.
Reg].push(DA);
1141 Visited.insert(
T.Id);
1156 }
while (RA.
Id != 0 && RA.
Id != Start);
1161 void DataFlowGraph::reset() {
1185 return Related(
TA) &&
1210 template <
typename Predicate>
1220 if (NA.
Id == 0 || NA.
Id == Start)
1227 if (NA.
Id != 0 && NA.
Id != Start)
1228 return std::make_pair(RA, NA);
1240 return TA.Addr->getFlags() == Flags;
1242 auto Loc = locateNextRef(IA, RA, IsShadow);
1243 if (Loc.second.Id != 0 || !Create)
1260 return TA.Addr->getFlags() == Flags;
1262 return locateNextRef(IA, RA, IsShadow).second;
1294 if (PRI.
alias(DR, UR))
1300 bool IsCall = isCall(In);
1309 for (
unsigned OpN = 0; OpN < NumOps; ++OpN) {
1313 unsigned R = Op.
getReg();
1327 if (IsCall && Op.
isDead())
1331 assert(!DoneDefs.test(R));
1337 for (
unsigned OpN = 0; OpN < NumOps; ++OpN) {
1347 for (
unsigned i = 1, e = TRI.
getNumRegs(); i != e; ++i)
1348 if (!(RM[i/32] & (1u << (i%32))))
1349 DoneClobbers.set(i);
1354 for (
unsigned OpN = 0; OpN < NumOps; ++OpN) {
1358 unsigned R = Op.
getReg();
1366 if (isDefUndef(In, RR))
1373 if (IsCall && Op.
isDead()) {
1374 if (DoneClobbers.test(R))
1383 for (
unsigned OpN = 0; OpN < NumOps; ++OpN) {
1387 unsigned R = Op.
getReg();
1402 void DataFlowGraph::recordDefsForDF(BlockRefsMap &PhiM,
1409 auto DFLoc = MDF.
find(BB);
1410 if (DFLoc == MDF.
end() || DFLoc->second.empty())
1426 for (
unsigned i = 0; i < IDF.size(); ++i) {
1427 auto F = MDF.
find(IDF[i]);
1429 IDF.insert(
F->second.begin(),
F->second.end());
1434 for (
auto DB : IDF) {
1436 PhiM[DBA.
Id].insert(Defs.begin(), Defs.end());
1442 void DataFlowGraph::buildPhis(BlockRefsMap &PhiM,
RegisterSet &AllRefs,
1446 auto HasDF = PhiM.find(BA.
Id);
1447 if (HasDF == PhiM.end() || HasDF->second.empty())
1463 MaxDF.insert(MaxCoverIn(I, HasDF->second));
1465 std::vector<RegisterRef> MaxRefs;
1467 MaxRefs.push_back(MaxCoverIn(I, AllRefs));
1476 auto NewEnd = std::unique(MaxRefs.begin(), MaxRefs.end());
1477 MaxRefs.erase(NewEnd, MaxRefs.end());
1480 std::vector<unsigned> &Closure) ->
bool {
1481 for (
unsigned I : Closure)
1482 if (PRI.
alias(RR, MaxRefs[I]))
1493 while (!MaxRefs.empty()) {
1498 std::vector<unsigned> ClosureIdx = { 0 };
1499 for (
unsigned i = 1; i != MaxRefs.size(); ++i)
1500 if (Aliased(MaxRefs[i], ClosureIdx))
1501 ClosureIdx.push_back(i);
1504 unsigned CS = ClosureIdx.size();
1508 for (
unsigned X = 0;
X != CS; ++
X) {
1516 for (
unsigned X = 0;
X != CS; ++
X) {
1524 auto Begin = MaxRefs.begin();
1525 for (
unsigned i = ClosureIdx.size(); i != 0; --i)
1526 MaxRefs.erase(Begin + ClosureIdx[i-1]);
1531 void DataFlowGraph::removeUnusedPhis() {
1544 static auto HasUsedDef = [](
NodeList &Ms) ->
bool {
1558 while (!PhiQ.
empty()) {
1559 auto PA = addr<PhiNode*>(PhiQ[0]);
1561 NodeList Refs = PA.Addr->members(*
this);
1562 if (HasUsedDef(Refs))
1566 auto RDA = addr<DefNode*>(RD);
1584 template <
typename T>
1621 TAP.
Addr->linkToDef(TAP.
Id, RDA);
1629 template <
typename Predicate>
1647 auto F = DefM.find(RR.
Reg);
1648 if (
F == DefM.end())
1652 linkRefUp<UseNode*>(SA,
RA,
DS);
1654 linkRefUp<DefNode*>(SA,
RA,
DS);
1673 assert(BA.
Addr &&
"block node address is needed to create a data-flow link");
1681 linkStmtRefs(DefM, IA,
IsUse);
1682 linkStmtRefs(DefM, IA, IsClobber);
1686 pushClobbers(IA, DefM);
1689 linkStmtRefs(DefM, IA, IsNoClobber);
1699 linkBlockRefs(DefM, SBA);
1708 return PUA.
Addr->getPredecessor() == BA.
Id;
1730 linkRefUp<UseNode*>(IA, PUA, DefM[RR.
Reg]);
1749 auto RDA = addr<DefNode*>(RD);
1750 auto TA = addr<UseNode*>(RDA.Addr->getReachedUse());
1751 if (TA.Id == UA.
Id) {
1752 RDA.
Addr->setReachedUse(Sib);
1756 while (TA.Id != 0) {
1757 NodeId S = TA.Addr->getSibling();
1762 TA = addr<UseNode*>(S);
1795 auto RA = addr<RefNode*>(
N);
1807 I.Addr->setSibling(0);
1809 I.Addr->setSibling(0);
1812 I.Addr->setReachingDef(RD);
1814 I.Addr->setReachingDef(RD);
1823 auto RDA = addr<DefNode*>(RD);
1824 auto TA = addr<DefNode*>(RDA.Addr->getReachedDef());
1825 if (TA.Id == DA.
Id) {
1828 RDA.
Addr->setReachedDef(Sib);
1832 while (TA.Id != 0) {
1833 NodeId S = TA.Addr->getSibling();
1835 TA.Addr->setSibling(Sib);
1838 TA = addr<DefNode*>(S);
1843 if (!ReachedDefs.empty()) {
1845 Last.Addr->setSibling(RDA.Addr->getReachedDef());
1846 RDA.Addr->setReachedDef(ReachedDefs.front().
Id);
1849 if (!ReachedUses.empty()) {
1851 Last.Addr->setSibling(RDA.Addr->getReachedUse());
1852 RDA.Addr->setReachedUse(ReachedUses.front().
Id);
NodeAddr< BlockNode * > findBlock(MachineBasicBlock *BB) const
bool hasCoverOf(RegisterRef RR) const
raw_ostream & operator<<(raw_ostream &OS, const PrintLaneMaskOpt &P)
bool isRegMask() const
isRegMask - Tests if this is a MO_RegisterMask operand.
NodeId id(const NodeBase *P) const
void setReachingDef(NodeId RD)
NodeId getReachedUse() const
mop_iterator operands_end()
A common definition of LaneBitmask for use in TableGen and CodeGen.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
uint16_t getFlags() const
static uint16_t kind(uint16_t T)
bool isCall(QueryType Type=AnyInBundle) const
MachineDomTreeNode * getNode(MachineBasicBlock *BB) const
getNode - return the (Post)DominatorTree node for the specified basic block.
MachineBasicBlock * getMBB() const
This class represents lattice values for constants.
virtual bool isPreserving(const MachineInstr &In, unsigned OpNum) const
NodeAddr< NodeBase * > New()
NodeAddr< RefNode * > getNextShadow(NodeAddr< InstrNode *> IA, NodeAddr< RefNode *> RA, bool Create)
void append(NodeAddr< NodeBase *> NA)
static uint16_t type(uint16_t T)
void unlinkDef(NodeAddr< DefNode *> DA, bool RemoveFromOwner)
This class provides various memory handling functions that manipulate MemoryBlock instances...
void push_back(const T &Elt)
const MCPhysReg * getImplicitUses() const
Return a list of registers that are potentially read by any instance of this machine instruction...
NodeId id(const NodeBase *P) const
Describe properties that are true of each instruction in the target description file.
unsigned getReg() const
getReg - Returns the register number.
unsigned getSubReg() const
virtual const TargetLowering * getTargetLowering() const
DataFlowGraph(MachineFunction &mf, const TargetInstrInfo &tii, const TargetRegisterInfo &tri, const MachineDominatorTree &mdt, const MachineDominanceFrontier &mdf, const TargetOperandInfo &toi)
bool hasAliasOf(RegisterRef RR) const
unsigned const TargetRegisterInfo * TRI
Printable PrintLaneMask(LaneBitmask LaneMask)
Create Printable object to print LaneBitmasks on a raw_ostream.
iterator_range< mop_iterator > operands()
rr_iterator rr_begin() const
RegisterRef restrictRef(RegisterRef AR, RegisterRef BR) const
iterator_range< succ_iterator > successors()
void releaseBlock(NodeId B, DefStackMap &DefM)
SI optimize exec mask operations pre RA
const HexagonInstrInfo * TII
Printable printMBBReference(const MachineBasicBlock &MBB)
Prints a machine basic block reference.
unsigned getNumOperands() const
Retuns the total number of operands.
RegisterRef getRegRef(const DataFlowGraph &G) const
The access may reference the value stored in memory.
std::set< RegisterRef > RegisterSet
static constexpr LaneBitmask getAll()
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
const char * getSymbolName() const
bool remove(const value_type &X)
Remove an item from the set vector.
void unlinkUse(NodeAddr< UseNode *> UA, bool RemoveFromOwner)
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
const MCInstrDesc & getDesc() const
Returns the target instruction descriptor of this MachineInstr.
bool isIndirectBranch(QueryType Type=AnyInBundle) const
Return true if this is an indirect branch, such as a branch through a register.
NodeAddr< NodeBase * > getLastMember(const DataFlowGraph &G) const
virtual bool isClobbering(const MachineInstr &In, unsigned OpNum) const
bool insert(const value_type &X)
Insert a new element into the SetVector.
void addMemberAfter(NodeAddr< NodeBase *> MA, NodeAddr< NodeBase *> NA, const DataFlowGraph &G)
void linkToDef(NodeId Self, NodeAddr< DefNode *> DA)
Base class for the actual dominator tree node.
bool hasPersonalityFn() const
Check whether this function has a personality function.
std::set< RegisterId > getAliasSet(RegisterId Reg) const
NodeBase * ptr(NodeId N) const
constexpr char Attrs[]
Key for Kernel::Metadata::mAttrs.
void clear_block(NodeId N)
RegisterRef makeRegRef(unsigned Reg, unsigned Sub) const
NodeAddr< NodeBase * > getOwner(const DataFlowGraph &G)
bool isBranch(QueryType Type=AnyInBundle) const
Returns true if this is a conditional, unconditional, or indirect branch.
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
TargetInstrInfo - Interface to description of machine instruction set.
bool isReturn(QueryType Type=AnyInBundle) const
void setFlags(uint16_t F)
void setReachedDef(NodeId D)
NodeAddr< NodeBase * > getFirstMember(const DataFlowGraph &G) const
void addPhi(NodeAddr< PhiNode *> PA, const DataFlowGraph &G)
NodeAddr< RefNode * > getNextRelated(NodeAddr< InstrNode *> IA, NodeAddr< RefNode *> RA) const
unsigned getNumRegs() const
Return the number of registers this target has (useful for sizing arrays holding per register informa...
static bool IsUse(const NodeAddr< NodeBase *> BA)
const MCPhysReg * getImplicitDefs() const
Return a list of registers that are potentially written by any instance of this machine instruction...
Control flow instructions. These all have token chains.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
unsigned const MachineRegisterInfo * MRI
virtual unsigned getExceptionPointerRegister(const Constant *PersonalityFn) const
If a physical register, this returns the register that receives the exception address on entry to an ...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
The instances of the Type class are immutable: once they are created, they are never changed...
rr_iterator rr_end() const
NodeAddr< T > addr(NodeId N) const
NodeAddr< BlockNode * > getEntryBlock(const DataFlowGraph &G)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This is an important base class in LLVM.
const GlobalValue * getGlobal() const
unsigned getSubReg(unsigned Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo...
void pushAllDefs(NodeAddr< InstrNode *> IA, DefStackMap &DM)
virtual unsigned getExceptionSelectorRegister(const Constant *PersonalityFn) const
If a physical register, this returns the register that receives the exception typeid on entry to a la...
NodeList getRelatedRefs(NodeAddr< InstrNode *> IA, NodeAddr< RefNode *> RA) const
static bool IsPhi(const NodeAddr< NodeBase *> BA)
static uint16_t flags(uint16_t T)
NodeId getPredecessor() const
constexpr bool all() const
iterator_range< pred_iterator > predecessors()
auto find_if(R &&Range, UnaryPredicate P) -> decltype(adl_begin(Range))
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly...
static void printRefHeader(raw_ostream &OS, const NodeAddr< RefNode *> RA, const DataFlowGraph &G)
NodeList members_if(Predicate P, const DataFlowGraph &G) const
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
RegisterRef unpack(PackedRegisterRef PR) const
NodeList members(const DataFlowGraph &G) const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
bool isPredicated(const MachineInstr &MI) const override
Returns true if the instruction is already predicated.
void sort(IteratorTy Start, IteratorTy End)
constexpr bool empty(const T &RangeOrContainer)
Test whether RangeOrContainer is empty. Similar to C++17 std::empty.
virtual bool isFixedReg(const MachineInstr &In, unsigned OpNum) const
iterator find(MachineBasicBlock *B)
void setPredecessor(NodeId B)
RegisterAggr & insert(RegisterRef RR)
void markBlock(NodeId B, DefStackMap &DefM)
bool isGlobal() const
isGlobal - Tests if this is a MO_GlobalAddress operand.
MachineOperand class - Representation of each machine instruction operand.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
void setAttrs(uint16_t A)
void linkToDef(NodeId Self, NodeAddr< DefNode *> DA)
unsigned pred_size() const
DominanceFrontierBase< MachineBasicBlock, false >::DomSetType DomSetType
const Function & getFunction() const
Return the LLVM function that this machine code represents.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
const uint32_t * getRegMask() const
getRegMask - Returns a bit mask of registers preserved by this RegMask operand.
ArrayRef< std::pair< unsigned, unsigned > > liveins() const
NodeId getReachedDef() const
unsigned succ_size() const
void removeMember(NodeAddr< NodeBase *> NA, const DataFlowGraph &G)
const MachineBasicBlock * getParent() const
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
std::set< NodeId > NodeSet
Representation of each machine instruction.
NodeId getReachingDef() const
NodeAddr< NodeBase * > getOwner(const DataFlowGraph &G)
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
void setRegRef(RegisterRef RR, DataFlowGraph &G)
PackedRegisterRef pack(RegisterRef RR)
bool isEHPad() const
Returns true if the block is a landing pad.
LLVM_NODISCARD bool empty() const
void addMember(NodeAddr< NodeBase *> NA, const DataFlowGraph &G)
RegisterId getRegMaskId(const uint32_t *RM) const
StringRef getName() const
Return a constant reference to the value's name.
constexpr bool any() const
bool empty() const
Determine if the SetVector is empty or not.
void build(unsigned Options=BuildOptions::None)
bool tracksLiveness() const
tracksLiveness - Returns true when tracking register liveness accurately.
NodeAddr< BlockNode * > findBlock(const MachineBasicBlock *BB, const DataFlowGraph &G) const
bool isSymbol() const
isSymbol - Tests if this is a MO_ExternalSymbol operand.
iterator_range< livein_iterator > liveins() const
bool isReg() const
isReg - Tests if this is a MO_Register operand.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool alias(RegisterRef RA, RegisterRef RB) const
static bool isRegMaskId(RegisterId R)
static bool isCoverOf(RegisterRef RA, RegisterRef RB, const PhysicalRegisterInfo &PRI)
Constant * getPersonalityFn() const
Get the personality function associated with this function.
A vector that has set insertion semantics.
MachineBasicBlock * getCode() const
This class implements an extremely fast bulk output stream that can only output to a stream...
static bool IsDef(const NodeAddr< NodeBase *> BA)
bool isMBB() const
isMBB - Tests if this is a MO_MachineBasicBlock operand.
const MachineOperand & getOperand(unsigned i) const
NodeId getSibling() const
NodeAddr< RefNode * > getNextRef(RegisterRef RR, Predicate P, bool NextOnly, const DataFlowGraph &G)
void start_block(NodeId N)
std::unordered_map< RegisterId, DefStack > DefStackMap
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
This file describes how to lower LLVM code to machine code.
void setReachedUse(NodeId U)
void setSibling(NodeId Sib)