[llvm-dev] Handling user reserved registers on high register count architecture

Jason Eckhardt via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 29 10:42:29 PDT 2021


Instead of feature bits, you might use a more generic cl::opt/cl::list (e.g., cl::multi_val or cl::CommaSeparated) to
specify something like "-reserve-regs 8 32" or "-reserve-regs=8,32". This way, the user could specify a range of
registers to reserve rather than each register individually. Bitvector UserReservedRegister would be set elsewhere
according to the global variable specified in your cl::opt/cl::list declaration.

________________________________
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Braden Nelson via llvm-dev <llvm-dev at lists.llvm.org>
Sent: Saturday, March 27, 2021 9:22 PM
To: llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org>
Subject: [llvm-dev] Handling user reserved registers on high register count architecture

External email: Use caution opening links or attachments


I'm working with the Parallax Propeller 2, which has 496 allocatable
registers. Needless to say, I can't do this:


foreach i = {1-496} in
     def FeatureReserveR#i :
         SubtargetFeature<"reserve-r"#i, "UserReservedRegister[P2::R"#i#"]",
                          "true", "Reserve R"#i>;

So does anyone have a better idea?

Thanks, Braden.
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=04%7C01%7Cjeckhardt%40nvidia.com%7Ce735a7c3597c48b073d608d8f190522c%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637524949461106740%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kNnMJn%2F1ElofuVvBsPOCXmS2KTdcIQV6QaiZKFZT16E%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210329/764f618a/attachment.html>


More information about the llvm-dev mailing list