<span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px">Hello all,<div><br></div><div>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   </div>


<div>Backend":</div><div><br></div><div>2. <span style="font-family:Times;font-size:medium">Describe the register set of the target. Use "TableGen" to generate code for register definition, register aliases, and register classes from a target-specific </span><span style="font-family:Times;font-size:medium"><tt>RegisterInfo.td</tt></span><span style="font-family:Times;font-size:medium"> input file. </span></div>


<div><span style="font-family:Times;font-size:medium"><br></span></div><div><span style="font-family:Times;font-size:medium">3. </span>Describe the instruction set of the target. Use "TableGen" to generate code for target-specific instructions from target-specific versions of <tt>TargetInstrFormats.td</tt> and<tt>TargetInstrInfo.td</tt>. </div>


<div><br></div><div>4. <span style="font-family:Times;font-size:medium">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 </span><span style="font-family:Times;font-size:medium"><tt>TargetInstrInfo.td</tt></span><span style="font-family:Times;font-size:medium">. </span></div>


<div><span style="font-family:Times;font-size:medium"><br></span></div><div><font face="Times"><span style="font-size:medium">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??</span></font></div>


<div><font face="Times"><span style="font-size:medium"><br></span></font></div><div><font face="Times"><span style="font-size:medium">thanks a lot</span></font></div><div><font face="Times"><span style="font-size:medium"><br>


</span></font></div><div><font face="Times"><span style="font-size:medium">yi-hong</span></font></div></span>