capture implicit uses and defs in CodeGenInstruction
authorChris Lattner <sabre@nondot.org>
Thu, 18 Mar 2010 21:42:03 +0000 (21:42 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 18 Mar 2010 21:42:03 +0000 (21:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98879 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenInstruction.cpp
utils/TableGen/CodeGenInstruction.h

index 6ab5f06dda71138b3c0c245af8ed0a395ba9ea65..eea55618721e51d7bbb79aa85cf2e7c5a0cd925f 100644 (file)
@@ -123,6 +123,8 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
   hasExtraDefRegAllocReq = R->getValueAsBit("hasExtraDefRegAllocReq");
   hasOptionalDef = false;
   isVariadic = false;
+  ImplicitDefs = R->getValueAsListOfDefs("Defs");
+  ImplicitUses = R->getValueAsListOfDefs("Uses");
 
   if (neverHasSideEffects + hasSideEffects > 1)
     throw R->getName() + ": multiple conflicting side-effect flags set!";
index 8e7051bcda2f4be215d09a3092084ea4115e867b..c369123dd6948006c2357971a4e31816e6b9cf0d 100644 (file)
@@ -114,6 +114,10 @@ namespace llvm {
     /// type (which is a record).
     std::vector<OperandInfo> OperandList;
 
+    /// ImplicitDefs/ImplicitUses - These are lists of registers that are
+    /// implicitly defined and used by the instruction.
+    std::vector<Record*> ImplicitDefs, ImplicitUses;
+
     // Various boolean values we track for the instruction.
     bool isReturn;
     bool isBranch;