Rail Shafigulin via llvm-dev
2015-Dec-22 00:40 UTC
[llvm-dev] Reserve registers not to be used by the compiler
Does anyone know if there is a way to reserve a register set not to be used by a compiler? For example there are 64 available registers and the compiler can use only registers 0-31 and 40-45, and the others should be left alone. I know that the simplest solution is to simply change number registers in one of the .td files, but what I'm looking is an option to use at run time. I need this to research various register combinations. Recompiling and running tests takes some time. If I could compile my code with say 128 registers and thn tell compiler to use only a certain set (say 0-32) at run time then this would significantly speed up my testing. I would be able to see what the code is doing for the same test with a 32 registers vs 64 vs 96 vs any number up to 128. Does anyone know if there is a way to do it? Any help is appreciated. -- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151221/e5011641/attachment.html>
Matt Arsenault via llvm-dev
2015-Dec-22 01:02 UTC
[llvm-dev] Reserve registers not to be used by the compiler
On 12/21/2015 07:40 PM, Rail Shafigulin via llvm-dev wrote:> Does anyone know if there is a way to reserve a register set not to be > used by a compiler? For example there are 64 available registers and > the compiler can use only registers 0-31 and 40-45, and the others > should be left alone. > > I know that the simplest solution is to simply change number registers > in one of the .td files, but what I'm looking is an option to use at > run time. I need this to research various register combinations. > Recompiling and running tests takes some time. If I could compile my > code with say 128 registers and thn tell compiler to use only a > certain set (say 0-32) at run time then this would significantly speed > up my testing. I would be able to see what the code is doing for the > same test with a 32 registers vs 64 vs 96 vs any number up to 128. > > Does anyone know if there is a way to do it? Any help is appreciated. > > -- > Rail Shafigulin > Software Engineer > Esencia Technologies > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-devYou can override TargetRegisterInfo::getReservedRegs and reserve any registers you do not want allocated. -Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151221/09627b15/attachment.html>
Rail Shafigulin via llvm-dev
2015-Dec-23 21:41 UTC
[llvm-dev] Reserve registers not to be used by the compiler
> > You can override TargetRegisterInfo::getReservedRegs and reserve any > registers you do not want allocated. > > -Matt >Thanks. -- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151223/f34833cd/attachment.html>