forked from OSchip/llvm-project
[Hexagon] Move some debug-only variable declarations into DEBUG
llvm-svn: 270459
This commit is contained in:
parent
b3d96882ec
commit
4a3e285ec3
|
@ -144,10 +144,11 @@ MachineInstr *HexagonOptAddrMode::getReachedDefMI(NodeAddr<StmtNode *> SN,
|
|||
}
|
||||
if (HasReachingDef) {
|
||||
NodeAddr<DefNode *> RDN = DFG->addr<DefNode *>(RD);
|
||||
NodeAddr<StmtNode *> ReachingIA = RDN.Addr->getOwner(*DFG);
|
||||
DEBUG(dbgs() << "\t\t\t[Def Node]: "
|
||||
<< Print<NodeAddr<InstrNode *>>(ReachingIA, *DFG) << "\n");
|
||||
(void)ReachingIA;
|
||||
DEBUG({
|
||||
NodeAddr<StmtNode *> ReachingIA = RDN.Addr->getOwner(*DFG);
|
||||
dbgs() << "\t\t\t[Def Node]: "
|
||||
<< Print<NodeAddr<InstrNode *>>(ReachingIA, *DFG) << "\n";
|
||||
});
|
||||
NodeId ReachedID = RDN.Addr->getReachedDef();
|
||||
if (!ReachedID)
|
||||
return ReachedDefMI;
|
||||
|
@ -231,14 +232,15 @@ bool HexagonOptAddrMode::allValidCandidates(NodeAddr<StmtNode *> SA,
|
|||
NodeSet Visited, Defs;
|
||||
const auto &ReachingDefs = LV->getAllReachingDefsRec(UR, UN, Visited, Defs);
|
||||
if (ReachingDefs.size() > 1) {
|
||||
DEBUG(dbgs() << "*** Multiple Reaching Defs found!!! *** \n");
|
||||
for (auto DI : ReachingDefs) {
|
||||
NodeAddr<UseNode *> DA = DFG->addr<UseNode *>(DI);
|
||||
NodeAddr<StmtNode *> TempIA = DA.Addr->getOwner(*DFG);
|
||||
(void)TempIA;
|
||||
DEBUG(dbgs() << "\t\t[Reaching Def]: "
|
||||
<< Print<NodeAddr<InstrNode *>>(TempIA, *DFG) << "\n");
|
||||
}
|
||||
DEBUG({
|
||||
dbgs() << "*** Multiple Reaching Defs found!!! ***\n";
|
||||
for (auto DI : ReachingDefs) {
|
||||
NodeAddr<UseNode *> DA = DFG->addr<UseNode *>(DI);
|
||||
NodeAddr<StmtNode *> TempIA = DA.Addr->getOwner(*DFG);
|
||||
dbgs() << "\t\t[Reaching Def]: "
|
||||
<< Print<NodeAddr<InstrNode *>>(TempIA, *DFG) << "\n";
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -255,10 +257,11 @@ void HexagonOptAddrMode::getAllRealUses(NodeAddr<StmtNode *> SA,
|
|||
|
||||
for (auto UI : UseSet) {
|
||||
NodeAddr<UseNode *> UA = DFG->addr<UseNode *>(UI);
|
||||
NodeAddr<StmtNode *> TempIA = UA.Addr->getOwner(*DFG);
|
||||
(void)TempIA;
|
||||
DEBUG(dbgs() << "\t\t\t[Reached Use]: "
|
||||
<< Print<NodeAddr<InstrNode *>>(TempIA, *DFG) << "\n");
|
||||
DEBUG({
|
||||
NodeAddr<StmtNode *> TempIA = UA.Addr->getOwner(*DFG);
|
||||
dbgs() << "\t\t\t[Reached Use]: "
|
||||
<< Print<NodeAddr<InstrNode *>>(TempIA, *DFG) << "\n";
|
||||
});
|
||||
|
||||
if (UA.Addr->getFlags() & NodeAttrs::PhiRef) {
|
||||
NodeAddr<PhiNode *> PA = UA.Addr->getOwner(*DFG);
|
||||
|
@ -582,9 +585,8 @@ bool HexagonOptAddrMode::processBlock(NodeAddr<BlockNode *> BA) {
|
|||
|
||||
NodeAddr<StmtNode *> OwnerN = UseN.Addr->getOwner(*DFG);
|
||||
MachineInstr *UseMI = OwnerN.Addr->getCode();
|
||||
unsigned BBNum = UseMI->getParent()->getNumber();
|
||||
(void)BBNum;
|
||||
DEBUG(dbgs() << "\t\t[MI <BB#" << BBNum << ">]: " << *UseMI << "\n");
|
||||
DEBUG(dbgs() << "\t\t[MI <BB#" << UseMI->getParent()->getNumber()
|
||||
<< ">]: " << *UseMI << "\n");
|
||||
|
||||
int UseMOnum = -1;
|
||||
unsigned NumOperands = UseMI->getNumOperands();
|
||||
|
|
Loading…
Reference in New Issue