[LLVMdev] register allocation
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Feb 6 14:17:55 PST 2012
On Feb 3, 2012, at 12:26 AM, Jonas Paulsson <jonas.paulsson at ericsson.com> wrote:
> The CopyCost attribute would help me, if the register allocators would factor it in with the spillWeight calculation. I suppose this would be fairly simple to implement, given that all the register allocators except -fast use the CalcSpillWeights class, where it could be included. Would this make sense to you as a patch? Maybe CopyCost and SpillCost should be held separate, I don't know, but in this case a new attribute could be introduced.
Jonas, I doubt this would help you. Spill weights are only ever compared to other spill weights from the same register class. If you raise the spill weight of all your predicate registers by the same factor, it's not going to change anything.
Spill weights are used to determine what to spill. Not whether to spill or not.
More information about the llvm-dev