OSDN Git Service

Expose isConvertibleToThreeAddress and isCommutable bits to the code generator.
authorChris Lattner <sabre@nondot.org>
Sun, 2 Jan 2005 02:29:04 +0000 (02:29 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 2 Jan 2005 02:29:04 +0000 (02:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19243 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenInstruction.h
utils/TableGen/CodeGenTarget.cpp
utils/TableGen/InstrInfoEmitter.cpp

index 82df28a..62b0289 100644 (file)
@@ -74,6 +74,8 @@ namespace llvm {
     bool isLoad;
     bool isStore;
     bool isTwoAddress;
+    bool isConvertibleToThreeAddress;
+    bool isCommutable;
     bool isTerminator;
     bool hasDelaySlot;
 
index 3680f19..b9c8bdb 100644 (file)
@@ -217,6 +217,8 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
   isLoad       = R->getValueAsBit("isLoad");
   isStore      = R->getValueAsBit("isStore");
   isTwoAddress = R->getValueAsBit("isTwoAddress");
+  isConvertibleToThreeAddress = R->getValueAsBit("isConvertibleToThreeAddress");
+  isCommutable = R->getValueAsBit("isCommutable");
   isTerminator = R->getValueAsBit("isTerminator");
   hasDelaySlot = R->getValueAsBit("hasDelaySlot");
 
index 69570bc..113bc98 100644 (file)
@@ -116,6 +116,8 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num,
   if (Inst.isLoad)       OS << "|M_LOAD_FLAG";
   if (Inst.isStore)      OS << "|M_STORE_FLAG";
   if (Inst.isTwoAddress) OS << "|M_2_ADDR_FLAG";
+  if (Inst.isConvertibleToThreeAddress) OS << "|M_CONVERTIBLE_TO_3_ADDR";
+  if (Inst.isCommutable) OS << "|M_COMMUTABLE";
   if (Inst.isTerminator) OS << "|M_TERMINATOR_FLAG";
   OS << ", 0";