[Hexagon] Move some debug-only variable declarations into DEBUG

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270459 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Krzysztof Parzyszek 2016-05-23 17:31:30 +00:00
parent 30680ad2f1
commit 2123d3f905

View File

@ -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();