On Jun 20, 2011, at 11:47 AM, John Criswell wrote:> On 6/20/11 10:39 AM, Justin Holewinski wrote: >> >> For the PTX back-end, I would like to introduce a configure-time option to determine the number of architectural registers available to LLVM register allocation during code generation. The motivation for this is PTX is a virtual instruction set and the number of registers is configurable in the output file. Thus, the number of registers specified via tablegen is arbitrary. For different use-cases, it may be desirable to change this number. > > Is it possible to make this option a command-line option to llc instead of a configure-time option?Ideally, that would be the way to go. However, as far as I know, LLVM requires static register data that is generated from tablegen files. The only way I can think of changing this data is by automatically generating the tablegen files at configure time.> > In my experience, it's better to make these options command-line options to tools when possible; that way, when someone wants to experiment with changing the parameter, they do not need to recompile.I completely agree. Unfortunately, I do not believe that is possible in this case (without major LLVM back-end changes).> > -- John T. >Thanks, Justin Holewinski -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110620/2e9334f1/attachment.html>
Jakob Stoklund Olesen
2011-Jun-20 17:08 UTC
[LLVMdev] New Configure Option for LLVM Builds
On Jun 20, 2011, at 8:53 AM, Justin Holewinski wrote:> However, as far as I know, LLVM requires static register data that is generated from tablegen files.TableGen is not required, you can provide your own TargetRegisterInfo sub-class. That's a lot of work, though, and I wouldn't recommend it. /jakob
On Jun 20, 2011, at 1:08 PM, Jakob Stoklund Olesen wrote:> > On Jun 20, 2011, at 8:53 AM, Justin Holewinski wrote: > >> However, as far as I know, LLVM requires static register data that is generated from tablegen files. > > TableGen is not required, you can provide your own TargetRegisterInfo sub-class. That's a lot of work, though, and I wouldn't recommend it.That's an interesting idea. Since the PTX register file is fairly simple (no overlapping, etc.), the generated register info does not seem too complicated. My main concern would be if the register description structures change, which would require manual changes to the PTX back-end instead of just relying on TableGen being updated to use the new format.> > /jakob >Thanks, Justin Holewinski -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110620/914ea0c1/attachment.html>
Reasonably Related Threads
- [LLVMdev] New Configure Option for LLVM Builds
- [LLVMdev] New Configure Option for LLVM Builds
- [LLVMdev] TargetRegisterInfo and "infinite" register files
- [LLVMdev] TargetRegisterInfo and "infinite" register files
- [LLVMdev] TargetRegisterInfo and "infinite" register files