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