]> granicus.if.org Git - llvm/commitdiff
[WebAssembly] Delete an unnecessary line in RegStackify
authorHeejin Ahn <aheejin@gmail.com>
Wed, 26 Dec 2018 22:33:35 +0000 (22:33 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Wed, 26 Dec 2018 22:33:35 +0000 (22:33 +0000)
`OneUseInst` is set outside of the loop before and `OneUse` does not
change throughout the loop, so this line is not necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350076 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyRegStackify.cpp

index 3aeb28353029ea6e5356f7d365a1bc9306ce493a..ba69d6c53221a31884b23bb1a9eb39cf89d3dbb7 100644 (file)
@@ -414,7 +414,6 @@ static bool OneUseDominatesOtherUses(unsigned Reg, const MachineOperand &OneUse,
     if (UseVNI != OneUseVNI)
       continue;
 
-    const MachineInstr *OneUseInst = OneUse.getParent();
     if (UseInst == OneUseInst) {
       // Another use in the same instruction. We need to ensure that the one
       // selected use happens "before" it.