<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>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.</div><div><br></div><div>That said, my question is in regards to how best to implement this considering that the PTX back-end is a part of upstream LLVM and the new option will be committed to LLVM trunk.  Creating a new option seems trivial for the CMake build scripts; just add a special target to automatically generate parts of the PTXRegisterInfo.td file.  The Autotools build scripts seem to complicate matters, however.  The makefiles for the different back-ends appear to be regular makefiles that are not processed by automake, making it difficult to introduce configure-time variables.</div><div><br></div><div><ol class="MailOutline"><li>Is the introduction of a configure-time variable in the CMake build scripts an acceptable addition in LLVM trunk?</li><li>Is there any precedent for backend-specific configure options?  Would the autotools-based build system need to be modified to get something like this to work?</li></ol></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Thanks,<br><br>Justin Holewinski</span>
</div>
<br></body></html>