From: Misha Brukman Date: Fri, 16 Jul 2004 20:35:20 +0000 (+0000) Subject: * Enable allocation of registers r2-r10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=86fd274790383963f33341aa161da4c888d0fe10;p=oota-llvm.git * Enable allocation of registers r2-r10 * Allocate registers 13-31 backwards (to be able to store them all at once) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14896 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCRegisterInfo.td b/lib/Target/PowerPC/PPCRegisterInfo.td index d6e8175009d..8324b9439d0 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.td +++ b/lib/Target/PowerPC/PPCRegisterInfo.td @@ -73,14 +73,17 @@ def TBL : SPR<4>; def TBU : SPR<5>; /// Register classes +// Allocate volatiles first +// then nonvolatiles in reverse order since stmw/lmw save from rN to r31 def GPRC : RegisterClass + [R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, + R31, R30, R29, R28, R27, R26, R25, R24, R23, R22, R21, R20, R19, R18, R17, + R16, R15, R14, R13, R0, R1]> { let Methods = [{ iterator allocation_order_end(MachineFunction &MF) const { - return end()-10; // do not allocate r0-r10 + return end()-2; } }]; } @@ -89,4 +92,4 @@ def FPRC : RegisterClass; -//def CRRC : RegisterClass; +//def CRRC : RegisterClass;