[llvm-dev] preferring consecutive registers in allocater

Quentin Colombet via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 15 09:25:57 PDT 2018


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
Le mar. 14 août 2018 à 02:18, Atheel Massalha via llvm-dev
<llvm-dev at lists.llvm.org> a écrit :
>
> 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
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list