Don't try to be clever, just preserve the target's allocation order.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 6 Jun 2011 16:36:30 +0000 (16:36 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 6 Jun 2011 16:36:30 +0000 (16:36 +0000)
commit7c48913af62ced0da03ba58755cf5f53ad587ba8
treec5c8cd4bdc04692195936ff11a0b8cfc4446bc47
parent0b4d96baecf3fe6af0fd45ba815bacf91a017f97
Don't try to be clever, just preserve the target's allocation order.

The order of registers returned by getCalleeSavedRegs is used to lay out
the fixed stack slots for CSRs. Some targets like their CSRs used from
one end, and some targets want them used from the other end.

When computing an allocation order, simply preserve the relative
ordering of CSRs that the target specifies in its allocation order.
Reordering CSRs would break some targets, ARM in particular.

We still place volatiles before the CSRs, providing slightly better
results with different calling conventions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132680 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegisterClassInfo.cpp