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