[llvm] r255253 - [WebAssembly] Make WebAssemblyStoreResults only return true when it has a change.
Dan Gohman via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 06:17:37 PST 2015
Author: djg
Date: Thu Dec 10 08:17:36 2015
New Revision: 255253
URL: http://llvm.org/viewvc/llvm-project?rev=255253&view=rev
Log:
[WebAssembly] Make WebAssemblyStoreResults only return true when it has a change.
Modified:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp?rev=255253&r1=255252&r2=255253&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp Thu Dec 10 08:17:36 2015
@@ -71,6 +71,7 @@ bool WebAssemblyStoreResults::runOnMachi
const MachineRegisterInfo &MRI = MF.getRegInfo();
MachineDominatorTree &MDT = getAnalysis<MachineDominatorTree>();
+ bool Changed = false;
assert(MRI.isSSA() && "StoreResults depends on SSA form");
@@ -108,6 +109,7 @@ bool WebAssemblyStoreResults::runOnMachi
if (&MI == Where || !MDT.dominates(&MI, Where))
continue;
}
+ Changed = true;
DEBUG(dbgs() << "Setting operand " << O << " in " << *Where
<< " from " << MI << "\n");
O.setReg(ToReg);
@@ -115,5 +117,5 @@ bool WebAssemblyStoreResults::runOnMachi
}
}
- return true;
+ return Changed;
}
More information about the llvm-commits
mailing list