<div dir="ltr">Does anybody know is there is a way to print all the property values for a given def?<div><br></div><div>For example I have a following instruction definition in the .td file</div><div><br></div><div><div>let isReturn = 1, isTerminator = 1, hasDelaySlot=1, isBarrier = 1, isCodeGenOnly = 1, Inst = 0x44004800 in {</div><div>  def RET : InstBR<0x1, (outs), (ins),</div><div>                   "l.jr\tr9",</div><div>                   [(retflag)]>;</div><div>}</div><div><br></div><div>Ultimately when I track it down the def tracks down to class Instruction in include/llvm/Target/Target.td, ie. </div><div><br></div><div><div>class Instruction {</div><div>  string Namespace = "";</div><div><br></div><div>  dag OutOperandList;       // An dag containing the MI def operand list.</div><div>  dag InOperandList;        // An dag containing the MI use operand list.</div><div>  string AsmString = "";    // The .s format to print the instruction with.</div><div><br></div><div>  // Pattern - Set to the DAG pattern for this instruction, if we know of one,</div><div>  // otherwise, uninitialized.</div><div>  list<dag> Pattern;</div><div><br></div><div>  // The follow state will eventually be inferred automatically from the</div><div>  // instruction pattern.</div><div><br></div><div>  list<Register> Uses = []; // Default to using no non-operand registers</div><div>  list<Register> Defs = []; // Default to modifying no non-operand registers</div></div><div>  ...</div><div>  ...</div><div>  ...</div><div><div>  /// UseNamedOperandTable - If set, the operand indices of this instruction</div><div>  /// can be queried via the getNamedOperandIdx() function which is generated</div><div>  /// by TableGen.</div><div>  bit UseNamedOperandTable = 0;</div></div><div>}</div><div><br></div><div>Does anybody know if there is a way to print all those settings for my instruction in the following format:</div><div><br></div><div>def RET {</div><div><div>  string Namespace = "My Arch Namespace";</div><div><br></div><div>  dag OutOperandList = (outs);       // An dag containing the MI def operand list.</div><div>  dag InOperandList = (ins);        //  An dag containing the MI use operand list.</div><div>  string AsmString = ".jr\tr9";    // The </div></div><div>  ....</div><div>  ....</div><div>  ....</div><div>}</div><div><br></div><div><br></div><div>Any help is appreciated.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>R</div></div></div></div></div>
</div></div>