[llvm] r267658 - [X86] Set AddPristinesAndCSRs to FixupBW LivePhysRegs. NFC.

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 18:51:39 PDT 2016


Author: ab
Date: Tue Apr 26 20:51:38 2016
New Revision: 267658

URL: http://llvm.org/viewvc/llvm-project?rev=267658&view=rev
Log:
[X86] Set AddPristinesAndCSRs to FixupBW LivePhysRegs. NFC.

We run after PEI, so we need to AddPristinesAndCSRs.
In practice, that makes no difference here, because we only ask about
liveness of super-registers of defined GR8/GR16 registers, so they
can't be pristine. Still, it's the correct thing to do.

Thanks to Quentin for noticing!

Follow-up to r267495.

Modified:
    llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp

Modified: llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp?rev=267658&r1=267657&r2=267658&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp Tue Apr 26 20:51:38 2016
@@ -244,7 +244,8 @@ void FixupBWInstPass::processBasicBlock(
   // Start computing liveness for this block. We iterate from the end to be able
   // to update this for each instruction.
   LiveRegs.clear();
-  LiveRegs.addLiveOuts(&MBB);
+  // We run after PEI, so we need to AddPristinesAndCSRs.
+  LiveRegs.addLiveOuts(&MBB, /*AddPristinesAndCSRs=*/true);
 
   for (auto I = MBB.rbegin(); I != MBB.rend(); ++I) {
     MachineInstr *NewMI = nullptr;




More information about the llvm-commits mailing list