[PATCH] D22283: X86InstrInfo: No need for liveness analysis in classifyLEAReg()

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 17:41:14 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL276222: X86InstrInfo: No need for liveness analysis in classifyLEAReg() (authored by matze).

Changed prior to commit:
  https://reviews.llvm.org/D22283?vs=63737&id=64800#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D22283

Files:
  llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

Index: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
@@ -2693,24 +2693,8 @@
     ImplicitOp.setImplicit();
 
     NewSrc = getX86SubSuperRegister(Src.getReg(), 64);
-    MachineBasicBlock::LivenessQueryResult LQR =
-        MI.getParent()->computeRegisterLiveness(&getRegisterInfo(), NewSrc, MI);
-
-    switch (LQR) {
-    case MachineBasicBlock::LQR_Unknown:
-      // We can't give sane liveness flags to the instruction, abandon LEA
-      // formation.
-      return false;
-    case MachineBasicBlock::LQR_Live:
-      isKill = MI.killsRegister(SrcReg);
-      isUndef = false;
-      break;
-    default:
-      // The physreg itself is dead, so we have to use it as an <undef>.
-      isKill = false;
-      isUndef = true;
-      break;
-    }
+    isKill = Src.isKill();
+    isUndef = Src.isUndef();
   } else {
     // Virtual register of the wrong class, we have to create a temporary 64-bit
     // vreg to feed into the LEA.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22283.64800.patch
Type: text/x-patch
Size: 1099 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160721/faf51a30/attachment.bin>


More information about the llvm-commits mailing list