Minor optimization to allocate R8 registers in a better order.
authorChris Lattner <sabre@nondot.org>
Wed, 5 Jan 2005 16:09:16 +0000 (16:09 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 5 Jan 2005 16:09:16 +0000 (16:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19289 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86RegisterInfo.td

index 1d86c0e643711e813683a33a42046e47bc13e20c..f0ab68d4c9beebc08b370890b6d4e5b16d5cd4b1 100644 (file)
@@ -61,7 +61,13 @@ let Namespace = "X86" in {
 // top-level register classes.  The order specified in the register list is
 // implicitly defined to be the register allocation order.
 //
-def R8  : RegisterClass<i8,  8, [AL, AH, CL, CH, DL, DH, BL, BH]>;
+
+// List AL,CL,DL before AH,CH,DH, as X86 processors often suffer from false
+// dependences between upper and lower parts of the register.  BL and BH are
+// last because they are call clobbered. Both Athlon and P4 chips suffer this
+// issue.
+def R8  : RegisterClass<i8,  8, [AL, CL, DL, AH, CH, DH, BL, BH]>;
+
 def R16 : RegisterClass<i16, 16, [AX, CX, DX, SI, DI, BX, BP, SP]> {
   let Methods = [{
     iterator allocation_order_end(MachineFunction &MF) const {