[llvm-commits] [llvm] r112650 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.td

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Aug 31 14:51:07 PDT 2010


Author: stoklund
Date: Tue Aug 31 16:51:07 2010
New Revision: 112650

URL: http://llvm.org/viewvc/llvm-project?rev=112650&view=rev
Log:
Make %EFLAGS unallocatable.

No CCR virtual registers should exist, and %EFLAGS is used in ways that can
surprise RegAllocFast.

Modified:
    llvm/trunk/lib/Target/X86/X86RegisterInfo.td

Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.td?rev=112650&r1=112649&r2=112650&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.td Tue Aug 31 16:51:07 2010
@@ -833,4 +833,15 @@
 // Status flags registers.
 def CCR : RegisterClass<"X86", [i32], 32, [EFLAGS]> {
   let CopyCost = -1;  // Don't allow copying of status registers.
+
+  // EFLAGS is not allocatable.
+  let MethodProtos = [{
+    iterator allocation_order_end(const MachineFunction &MF) const;
+  }];
+  let MethodBodies = [{
+    CCRClass::iterator
+    CCRClass::allocation_order_end(const MachineFunction &MF) const {
+      return allocation_order_begin(MF);
+    }
+  }];
 }





More information about the llvm-commits mailing list