mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-18 17:55:18 +00:00
[WebAssembly] Make WebAssemblyStoreResults only return true when it has a change.
llvm-svn: 255253
This commit is contained in:
parent
cea85bef3f
commit
8e9d77609c
@ -71,6 +71,7 @@ bool WebAssemblyStoreResults::runOnMachineFunction(MachineFunction &MF) {
|
||||
|
||||
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::runOnMachineFunction(MachineFunction &MF) {
|
||||
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::runOnMachineFunction(MachineFunction &MF) {
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return Changed;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user