From: Jakob Stoklund Olesen Date: Tue, 31 Aug 2010 21:51:07 +0000 (+0000) Subject: Make %EFLAGS unallocatable. X-Git-Tag: llvmorg-2.8.0-rc0~361 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33e9fce2d645c0411de394fa39e6f4f2b541331f;p=platform%2Fupstream%2Fllvm.git Make %EFLAGS unallocatable. No CCR virtual registers should exist, and %EFLAGS is used in ways that can surprise RegAllocFast. llvm-svn: 112650 --- diff --git a/llvm/lib/Target/X86/X86RegisterInfo.td b/llvm/lib/Target/X86/X86RegisterInfo.td index 176e87812d21..95269b15760e 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.td +++ b/llvm/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); + } + }]; }