summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86RegisterInfo.td
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-31 21:51:07 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-31 21:51:07 +0000
commit63b1dbaadd4bb70a6fcb84db880fc34d72b9a956 (patch)
tree8b727b005bb4962e878efdd8f6a93dc83ac0aaf1 /lib/Target/X86/X86RegisterInfo.td
parentf14a648d80bcb45fa07db35f8f1f58e47111dc9e (diff)
downloadllvm-63b1dbaadd4bb70a6fcb84db880fc34d72b9a956.tar.gz
llvm-63b1dbaadd4bb70a6fcb84db880fc34d72b9a956.tar.bz2
llvm-63b1dbaadd4bb70a6fcb84db880fc34d72b9a956.tar.xz
Make %EFLAGS unallocatable.
No CCR virtual registers should exist, and %EFLAGS is used in ways that can surprise RegAllocFast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86RegisterInfo.td')
-rw-r--r--lib/Target/X86/X86RegisterInfo.td11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.td b/lib/Target/X86/X86RegisterInfo.td
index 176e87812d..95269b1576 100644
--- a/lib/Target/X86/X86RegisterInfo.td
+++ b/lib/Target/X86/X86RegisterInfo.td
@@ -833,4 +833,15 @@ def VR256 : RegisterClass<"X86", [v32i8, v8i32, v4i64, v8f32, v4f64], 256,
// 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);
+ }
+ }];
}