preferring consecutive registers in allocater

Hi,
Im trying to give priority for some machine instruction to allocate consecutive registers,
I saw some Architectures like ARM is “forcing” some instructions to use consecutive registers but in my case I do not want to force but to “prefer”, so if it will create spills I wont choose consecutive registers…

any ideas how to do this?
I saw “getRegAllocationHints” function but didnt see how it will help…
seems that I need to create a new Register Allocator by inheriting the Base Register Allocator…

thanks,
Atheel

Hi Atheel,

With getRegAllocationHints you have access to the machine function and
the register you are assigning.
Using this information, you can take a look at the instructions that
uses the register being assigned and the surrounding area and
influence the allocation order based on that.

Cheers,
-Quentin