<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 29, 2016 at 9:14 AM, Krzysztof Parzyszek via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: kparzysz<br>
Date: Fri Apr 29 11:14:00 2016<br>
New Revision: 268057<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=268057&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=268057&view=rev</a><br>
Log:<br>
Fix NDEBUG build: variables used only in debug code causing compile error<br>
<br>
Modified:<br>
llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp?rev=268057&r1=268056&r2=268057&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp?rev=268057&r1=268056&r2=268057&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp Fri Apr 29 11:14:00 2016<br>
@@ -147,6 +147,7 @@ MachineInstr *HexagonOptAddrMode::getRea<br>
NodeAddr<StmtNode *> ReachingIA = RDN.Addr->getOwner(*DFG);<br>
DEBUG(dbgs() << "\t\t\t[Def Node]: "<br>
<< Print<NodeAddr<InstrNode *>>(ReachingIA, *DFG) << "\n");<br>
+ (void)ReachingIA;<br></blockquote><div><br>Could we just sink the variable into the DEBUG block (either remove the variable entirely & just use the expression in the Print<> call - or declare the variable inside the DEBUG block)<br><br>(same feedback for the last two instances in this file)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
NodeId ReachedID = RDN.Addr->getReachedDef();<br>
if (!ReachedID)<br>
return ReachedDefMI;<br>
@@ -233,9 +234,10 @@ bool HexagonOptAddrMode::allValidCandida<br>
DEBUG(dbgs() << "*** Multiple Reaching Defs found!!! *** \n");<br>
for (auto DI : ReachingDefs) {<br>
NodeAddr<UseNode *> DA = DFG->addr<UseNode *>(DI);<br>
- NodeAddr<StmtNode *> tempIA = DA.Addr->getOwner(*DFG);<br>
+ NodeAddr<StmtNode *> TempIA = DA.Addr->getOwner(*DFG);<br>
+ (void)TempIA;<br>
DEBUG(dbgs() << "\t\t[Reaching Def]: "<br>
- << Print<NodeAddr<InstrNode *>>(tempIA, *DFG) << "\n");<br>
+ << Print<NodeAddr<InstrNode *>>(TempIA, *DFG) << "\n");<br>
}<br></blockquote><div><br></div><div>Perhaps this whole loop should be inside a DEBUG() block?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
return false;<br>
}<br>
@@ -253,9 +255,10 @@ void HexagonOptAddrMode::getAllRealUses(<br>
<br>
for (auto UI : UseSet) {<br>
NodeAddr<UseNode *> UA = DFG->addr<UseNode *>(UI);<br>
- NodeAddr<StmtNode *> tempIA = UA.Addr->getOwner(*DFG);<br>
+ NodeAddr<StmtNode *> TempIA = UA.Addr->getOwner(*DFG);<br>
+ (void)TempIA;<br>
DEBUG(dbgs() << "\t\t\t[Reached Use]: "<br>
- << Print<NodeAddr<InstrNode *>>(tempIA, *DFG) << "\n");<br>
+ << Print<NodeAddr<InstrNode *>>(TempIA, *DFG) << "\n");<br>
<br>
if (UA.Addr->getFlags() & NodeAttrs::PhiRef) {<br>
NodeAddr<PhiNode *> PA = UA.Addr->getOwner(*DFG);<br>
@@ -580,6 +583,7 @@ bool HexagonOptAddrMode::processBlock(No<br>
NodeAddr<StmtNode *> OwnerN = UseN.Addr->getOwner(*DFG);<br>
MachineInstr *UseMI = OwnerN.Addr->getCode();<br>
unsigned BBNum = UseMI->getParent()->getNumber();<br>
+ (void)BBNum;<br>
DEBUG(dbgs() << "\t\t[MI <BB#" << BBNum << ">]: " << *UseMI << "\n");<br>
<br>
int UseMOnum = -1;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>