57 raw_ostream &operator<< (raw_ostream &OS, const Print<RegisterRef> &
P) {
58 auto &
TRI =
P.G.getTRI();
59 if (
P.Obj.Reg > 0 &&
P.Obj.Reg <
TRI.getNumRegs())
60 OS <<
TRI.getName(
P.Obj.Reg);
62 OS <<
'#' <<
P.Obj.Reg;
67 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeId> &
P) {
79 default: OS <<
"c?";
break;
95 default: OS <<
"r?";
break;
110 OS << Print<NodeId>(RA.
Id,
G) <<
'<' 116 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<DefNode*>> &
P) {
119 if (
NodeId N =
P.Obj.Addr->getReachingDef())
122 if (
NodeId N =
P.Obj.Addr->getReachedDef())
125 if (
NodeId N =
P.Obj.Addr->getReachedUse())
128 if (
NodeId N =
P.Obj.Addr->getSibling())
133 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<UseNode*>> &
P) {
136 if (
NodeId N =
P.Obj.Addr->getReachingDef())
139 if (
NodeId N =
P.Obj.Addr->getSibling())
148 if (
NodeId N =
P.Obj.Addr->getReachingDef())
151 if (
NodeId N =
P.Obj.Addr->getPredecessor())
154 if (
NodeId N =
P.Obj.Addr->getSibling())
159 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<RefNode*>> &
P) {
160 switch (
P.Obj.Addr->getKind()) {
162 OS << PrintNode<DefNode*>(
P.Obj,
P.G);
168 OS << PrintNode<UseNode*>(
P.Obj,
P.G);
175 unsigned N =
P.Obj.size();
176 for (
auto I :
P.Obj) {
177 OS << Print<NodeId>(
I.Id,
P.G);
185 unsigned N =
P.Obj.size();
186 for (
auto I :
P.Obj) {
187 OS << Print<NodeId>(
I,
P.G);
196 template <
typename T>
205 template <
typename T>
206 raw_ostream &operator<< (raw_ostream &OS, const PrintListV<T> &
P) {
207 unsigned N =
P.List.size();
209 OS << PrintNode<T>(A,
P.G);
218 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<PhiNode*>> &
P) {
219 OS << Print<NodeId>(
P.Obj.Id,
P.G) <<
": phi [" 220 << PrintListV<RefNode*>(
P.Obj.Addr->members(
P.G),
P.G) <<
']';
224 raw_ostream &operator<<(raw_ostream &OS, const Print<NodeAddr<StmtNode *>> &
P) {
227 OS << Print<NodeId>(
P.Obj.Id,
P.G) <<
": " <<
P.G.getTII().getName(Opc);
233 return Op.isMBB() ||
Op.isGlobal() ||
Op.isSymbol();
245 OS <<
" [" << PrintListV<RefNode*>(
P.Obj.Addr->members(
P.G),
P.G) <<
']';
251 switch (
P.Obj.Addr->getKind()) {
253 OS << PrintNode<PhiNode*>(
P.Obj,
P.G);
256 OS << PrintNode<StmtNode*>(
P.Obj,
P.G);
270 auto PrintBBs = [&OS] (std::vector<int> Ns) ->
void {
271 unsigned N = Ns.size();
280 <<
" --- preds(" << NP <<
"): ";
282 Ns.push_back(
B->getNumber());
286 OS <<
" succs(" << NS <<
"): ";
289 Ns.push_back(
B->getNumber());
293 for (
auto I :
P.Obj.Addr->members(
P.G))
298 raw_ostream &operator<<(raw_ostream &OS, const Print<NodeAddr<FuncNode *>> &
P) {
300 <<
P.Obj.Addr->getCode()->getName() <<
'\n';
301 for (
auto I :
P.Obj.Addr->members(
P.G))
307 raw_ostream &operator<< (raw_ostream &OS, const Print<RegisterSet> &
P) {
310 OS << ' ' << Print<RegisterRef>(
I,
P.G);
315 raw_ostream &operator<< (raw_ostream &OS, const Print<RegisterAggr> &
P) {
323 OS << Print<NodeId>(
I->Id, P.
G)
344 void NodeAllocator::startNewBlock() {
345 void *
T = MemPool.Allocate(NodesPerBlock*NodeMemSize, NodeMemSize);
346 char *
P =
static_cast<char*
>(
T);
351 assert((Blocks.size() < ((size_t)1 << (8*
sizeof(
NodeId)-BitsPerIndex))) &&
352 "Out of bits for block index");
356 bool NodeAllocator::needNewBlock() {
360 char *ActiveBegin = Blocks.back();
362 return Index >= NodesPerBlock;
372 makeId(ActiveB, Index) };
373 ActiveEnd += NodeMemSize;
378 uintptr_t A =
reinterpret_cast<uintptr_t
>(
P);
379 for (
unsigned i = 0, n = Blocks.size(); i != n; ++i) {
380 uintptr_t
B =
reinterpret_cast<uintptr_t
>(Blocks[i]);
381 if (A < B || A >= B + NodesPerBlock*NodeMemSize)
384 return makeId(i, Idx);
437 while (NA.
Addr !=
this) {
461 if (Code.FirstM == 0)
490 if (Code.LastM == MA.
Id)
500 if (MA.
Id == NA.
Id) {
501 if (Code.LastM == MA.
Id) {
503 Code.FirstM = Code.LastM = 0;
511 while (MA.
Addr !=
this) {
517 if (Code.LastM == NA.
Id)
529 return members_if(True, G);
536 while (NA.
Addr !=
this) {
570 addMemberAfter(M, PA, G);
590 return findBlock(EntryB, G);
624 if (
O.isGlobal() ||
O.isSymbol())
654 : MF(mf),
TII(tii),
TRI(tri), PRI(tri, mf), MDT(mdt), MDF(mdf), TOI(toi),
672 Pos =
DS.Stack.size();
673 while (Pos > 0 &&
DS.isDelimiter(
DS.Stack[Pos-1]))
680 for (
auto I = top(),
E = bottom();
I !=
E;
I.down())
690 unsigned P = nextDown(Stack.size());
705 unsigned P = Stack.size();
707 bool Found = isDelimiter(Stack[P-1], N);
717 unsigned DataFlowGraph::DefStack::nextUp(
unsigned P)
const {
720 unsigned SS = Stack.size();
725 IsDelim = isDelimiter(Stack[P-1]);
726 }
while (P < SS && IsDelim);
732 unsigned DataFlowGraph::DefStack::nextDown(
unsigned P)
const {
735 assert(P > 0 && P <= Stack.size());
736 bool IsDelim = isDelimiter(Stack[P-1]);
740 IsDelim = isDelimiter(Stack[P-1]);
741 }
while (P > 0 && IsDelim);
748 RegisterSet DataFlowGraph::getLandingPadLiveIns()
const {
875 BlockNodes.insert(std::make_pair(&B, BA));
877 if (
I.isDebugInstr())
884 NodeList Blocks = Func.Addr->members(*
this);
891 AllRefs.insert(
RA.Addr->getRegRef(*
this));
897 for (std::pair<unsigned,unsigned> P : MRI.
liveins())
920 if (!EHRegs.empty()) {
951 recordDefsForDF(PhiM, BA);
953 buildPhis(PhiM, AllRefs, BA);
957 linkBlockRefs(DM, EA);
992 if (PRI.
alias(AR, BR))
1000 for (
auto I = DefM.begin(),
E = DefM.end();
I !=
E; ++
I)
1001 I->second.start_block(B);
1009 for (
auto I = DefM.begin(),
E = DefM.end();
I !=
E; ++
I)
1010 I->second.clear_block(B);
1013 for (
auto I = DefM.begin(),
E = DefM.end(), NextI =
I;
I !=
E;
I = NextI) {
1014 NextI = std::next(
I);
1016 if (
I->second.empty())
1024 pushClobbers(IA, DefM);
1032 std::set<RegisterId> Defined;
1047 if (Visited.count(DA.Id))
1058 DefM[RR.
Reg].push(DA);
1059 Defined.insert(RR.
Reg);
1063 if (!Defined.count(A))
1068 Visited.insert(
T.Id);
1077 std::set<RegisterId> Defined;
1093 if (Visited.count(DA.Id))
1104 if (!Defined.insert(RR.
Reg).second) {
1106 dbgs() <<
"Multiple definitions of register: " 1114 DefM[RR.
Reg].push(DA);
1122 Visited.insert(
T.Id);
1137 }
while (RA.
Id != 0 && RA.
Id != Start);
1142 void DataFlowGraph::reset() {
1166 return Related(
TA) &&
1191 template <
typename Predicate>
1201 if (NA.
Id == 0 || NA.
Id == Start)
1208 if (NA.
Id != 0 && NA.
Id != Start)
1209 return std::make_pair(RA, NA);
1221 return TA.Addr->getFlags() == Flags;
1223 auto Loc = locateNextRef(IA, RA, IsShadow);
1224 if (Loc.second.Id != 0 || !Create)
1241 return TA.Addr->getFlags() == Flags;
1243 return locateNextRef(IA, RA, IsShadow).second;
1275 if (PRI.
alias(DR, UR))
1281 bool IsCall = isCall(In);
1290 for (
unsigned OpN = 0; OpN < NumOps; ++OpN) {
1308 if (IsCall && Op.
isDead())
1312 assert(!DoneDefs.test(R));
1318 for (
unsigned OpN = 0; OpN < NumOps; ++OpN) {
1328 for (
unsigned i = 1,
e = TRI.
getNumRegs(); i !=
e; ++i)
1329 if (!(RM[i/32] & (1u << (i%32))))
1330 DoneClobbers.set(i);
1335 for (
unsigned OpN = 0; OpN < NumOps; ++OpN) {
1347 if (isDefUndef(In, RR))
1354 if (IsCall && Op.
isDead()) {
1355 if (DoneClobbers.test(R))
1364 for (
unsigned OpN = 0; OpN < NumOps; ++OpN) {
1383 void DataFlowGraph::recordDefsForDF(BlockRefsMap &PhiM,
1390 auto DFLoc = MDF.
find(BB);
1391 if (DFLoc == MDF.
end() || DFLoc->second.empty())
1407 for (
unsigned i = 0; i < IDF.size(); ++i) {
1408 auto F = MDF.
find(IDF[i]);
1410 IDF.insert(
F->second.begin(),
F->second.end());
1415 for (
auto DB : IDF) {
1417 PhiM[DBA.
Id].insert(Defs.begin(), Defs.end());
1423 void DataFlowGraph::buildPhis(BlockRefsMap &PhiM,
RegisterSet &AllRefs,
1427 auto HasDF = PhiM.find(BA.
Id);
1428 if (HasDF == PhiM.end() || HasDF->second.empty())
1444 MaxDF.insert(MaxCoverIn(I, HasDF->second));
1446 std::vector<RegisterRef> MaxRefs;
1448 MaxRefs.push_back(MaxCoverIn(I, AllRefs));
1457 auto NewEnd = std::unique(MaxRefs.begin(), MaxRefs.end());
1458 MaxRefs.erase(NewEnd, MaxRefs.end());
1461 std::vector<unsigned> &Closure) ->
bool {
1462 for (
unsigned I : Closure)
1463 if (PRI.
alias(RR, MaxRefs[I]))
1474 while (!MaxRefs.empty()) {
1479 std::vector<unsigned> ClosureIdx = { 0 };
1480 for (
unsigned i = 1; i != MaxRefs.size(); ++i)
1481 if (Aliased(MaxRefs[i], ClosureIdx))
1482 ClosureIdx.push_back(i);
1485 unsigned CS = ClosureIdx.size();
1489 for (
unsigned X = 0;
X != CS; ++
X) {
1497 for (
unsigned X = 0;
X != CS; ++
X) {
1505 auto Begin = MaxRefs.begin();
1506 for (
unsigned i = ClosureIdx.size(); i != 0; --i)
1507 MaxRefs.erase(Begin + ClosureIdx[i-1]);
1512 void DataFlowGraph::removeUnusedPhis() {
1525 static auto HasUsedDef = [](
NodeList &Ms) ->
bool {
1539 while (!PhiQ.
empty()) {
1540 auto PA = addr<PhiNode*>(PhiQ[0]);
1542 NodeList Refs = PA.Addr->members(*
this);
1543 if (HasUsedDef(Refs))
1547 auto RDA = addr<DefNode*>(RD);
1565 template <
typename T>
1602 TAP.
Addr->linkToDef(TAP.
Id, RDA);
1610 template <
typename Predicate>
1628 auto F = DefM.find(RR.
Reg);
1629 if (
F == DefM.end())
1633 linkRefUp<UseNode*>(SA,
RA,
DS);
1635 linkRefUp<DefNode*>(SA,
RA,
DS);
1654 assert(BA.
Addr &&
"block node address is needed to create a data-flow link");
1662 linkStmtRefs(DefM, IA,
IsUse);
1663 linkStmtRefs(DefM, IA, IsClobber);
1667 pushClobbers(IA, DefM);
1670 linkStmtRefs(DefM, IA, IsNoClobber);
1680 linkBlockRefs(DefM, SBA);
1689 return PUA.
Addr->getPredecessor() == BA.
Id;
1711 linkRefUp<UseNode*>(IA, PUA, DefM[RR.
Reg]);
1730 auto RDA = addr<DefNode*>(RD);
1731 auto TA = addr<UseNode*>(RDA.Addr->getReachedUse());
1732 if (TA.Id == UA.
Id) {
1733 RDA.
Addr->setReachedUse(Sib);
1737 while (TA.Id != 0) {
1738 NodeId S = TA.Addr->getSibling();
1743 TA = addr<UseNode*>(S);
1776 auto RA = addr<RefNode*>(
N);
1788 I.Addr->setSibling(0);
1790 I.Addr->setSibling(0);
1793 I.Addr->setReachingDef(RD);
1795 I.Addr->setReachingDef(RD);
1804 auto RDA = addr<DefNode*>(RD);
1805 auto TA = addr<DefNode*>(RDA.Addr->getReachedDef());
1806 if (TA.Id == DA.
Id) {
1809 RDA.
Addr->setReachedDef(Sib);
1813 while (TA.Id != 0) {
1814 NodeId S = TA.Addr->getSibling();
1816 TA.Addr->setSibling(Sib);
1819 TA = addr<DefNode*>(S);
1824 if (!ReachedDefs.empty()) {
1826 Last.Addr->setSibling(RDA.Addr->getReachedDef());
1827 RDA.Addr->setReachedDef(ReachedDefs.front().
Id);
1830 if (!ReachedUses.empty()) {
1832 Last.Addr->setSibling(RDA.Addr->getReachedUse());
1833 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)
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
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 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
static RegisterPass< DebugifyModulePass > DM("debugify", "Attach debug info to everything")
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)
Register getSubReg(MCRegister Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo...
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.
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
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.
static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")
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)
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.
Register getReg() const
getReg - Returns the register number.
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...
Wrapper class representing virtual and physical registers.
This file describes how to lower LLVM code to machine code.
void setReachedUse(NodeId U)
void setSibling(NodeId Sib)