[LLVMdev] New Configure Option for LLVM Builds

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Jun 20 10:06:15 PDT 2011


On Jun 20, 2011, at 8: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.
> 
> 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.
> 
> 	• Is the introduction of a configure-time variable in the CMake build scripts an acceptable addition in LLVM trunk?
> 	• 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?

This should be a run-time option.

You should be able to define 'enough' registers in your RegisterInfo.td file, and then simply reserve the registers you don't want.

/jakob





More information about the llvm-dev mailing list