[llvm-commits] [PATCH] TableGen backend support to express relations between instruction
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Oct 19 17:03:18 PDT 2012
On Oct 19, 2012, at 9:32 AM, Jyotsna Verma <jverma at codeaurora.org> wrote:
> <0001-Add-TableGen-support-to-create-relationship-maps-bet.patch>
--- a/utils/TableGen/TableGen.cpp
+++ b/utils/TableGen/TableGen.cpp
@@ -102,6 +102,7 @@ bool LLVMTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
break;
case GenInstrInfo:
EmitInstrInfo(Records, OS);
+ EmitMapTable(Records, OS);
break;
case GenCallingConv:
EmitCallingConv(Records, OS);
Please add this call inside EmitInstrInfo.
+ OS << "uint16_t "<<InstrMapDesc.getName();
+ // Number of columns in the table are NumCol+1 because key instructions are
+ // emitted as first column.
+ OS << "Table[]["<< NumCol+1 << "] = {\n";
Const tables, please.
+ OS << "int16_t "<< InstrMapDesc.getName() << "(uint16_t Opcode";
Opcodes are in the range 0-64K. They won't fit in an int16_t.
/jakob
More information about the llvm-commits
mailing list