Atheel Massalha via llvm-dev
2018-Aug-08 06:33 UTC
[llvm-dev] 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180808/f617bfb6/attachment.html>
Quentin Colombet via llvm-dev
2018-Aug-15 16:25 UTC
[llvm-dev] preferring consecutive registers in allocater
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