Hello Jakob,<div><br></div><div>Is this means that TableGen execution is handled in Makefile. Porting programmer doesn't need to execute TableGen by hand?</div><div><br></div><div>thanks<br><br><div class="gmail_quote">
2011/3/10 Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk">stoklund@2pi.dk</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
On Mar 9, 2011, at 2:13 PM, Lu Mitnick wrote:<br>
<br>
> Hello all,<br>
><br>
> I have some question about usage of TableGen when adding a new LLVM Backend. There are three place to use TableGen in basic steps of document "Writing an LLVM Compiler<br>
> Backend":<br>
><br>
> 2. Describe the register set of the target. Use "TableGen" to generate code for register definition, register aliases, and register classes from a target-specific RegisterInfo.td input file.<br>
><br>
> 3. Describe the instruction set of the target. Use "TableGen" to generate code for target-specific instructions from target-specific versions of TargetInstrFormats.td andTargetInstrInfo.td.<br>
><br>
> 4. Describe the selection and conversion of the LLVM IR from a Directed Acyclic Graph (DAG) representation of instructions to native target-specific instructions. Use "TableGen" to generate code that matches patterns and selects instructions based on additional information in a target-specific version of TargetInstrInfo.td.<br>

><br>
> I have already read the document "TableGen Fundamentals" and write correspond .td files in each steps. However I don't know which TableGen options should I use in 2, 3 or 4 steps as above. Would anyone mind to tell me??<br>

<br>
</div></div>Look at Makefile.rules in the LLVM top-level directory. There is a bunch of targets executing $(TableGen).<br>
<br>
You can also run 'make VERBOSE=1' to see the commands used to build the existing targets.<br>
<font color="#888888"><br>
/jakob<br>
<br>
</font></blockquote></div><br></div>