[PATCH 1/2] TableGen: Generate a function for getting operand indices based on their defined names

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Jun 18 15:42:22 PDT 2013


On Jun 18, 2013, at 3:39 PM, Tom Stellard <tom at stellard.net> wrote:

> On Mon, Jun 17, 2013 at 06:59:03PM -0700, Sean Silva wrote:
>> Hi Tom,
>> 
>> This patch could really use some documentation.
>> 
>> I recommend adding a description of this new TableGen capability to the
>> appropriate part of <http://llvm.org/docs/WritingAnLLVMBackend.html>
>> (docs/WritingAnLLVMBackend.rst), or possibly adding a new page like <
>> http://llvm.org/docs/HowToUseInstrMappings.html> (although that was a
>> larger patch; most of my comments in the review for that feature are likely
>> relevant for this patch <
>> http://thread.gmane.org/gmane.comp.compilers.llvm.cvs/123031>) and linking
>> to it from WritingAnLLVMBackend . At the very least, please describe the
>> interface of the generated code (something like "this results in the
>> generation of a namespace that looks like ..., and a function with the
>> following signature and name: ..."), and a before/after of how to modify
>> existing TableGen patterns to take advantage of this functionality. If you
>> decide to make a separate page, you might find <
>> http://llvm.org/docs/SphinxQuickstartTemplate.html> helpful.
>> 
> 
>> Your second patch seems to introduce some tricky magic #define's to change
>> the content of the .inc file. I think those ought to be documented
>> alongside what I mentioned above.
>> 
> 
> I will submit a new patch with all this documentation once Jakob
> approves the approach taken in this patch.

I’m OK with the approach.

/jakob





More information about the llvm-commits mailing list