summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-18 21:42:03 +0000
committerChris Lattner <sabre@nondot.org>2010-03-18 21:42:03 +0000
commitf506b6b4718d8343c1133daca468e767cd5fb7ab (patch)
tree83c985c1825a72c83da88ab14656eb3f9abf8a1f /utils
parentef988984d75c1d64bc03ad4743f43f5f36619bcb (diff)
downloadllvm-f506b6b4718d8343c1133daca468e767cd5fb7ab.tar.gz
llvm-f506b6b4718d8343c1133daca468e767cd5fb7ab.tar.bz2
llvm-f506b6b4718d8343c1133daca468e767cd5fb7ab.tar.xz
capture implicit uses and defs in CodeGenInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CodeGenInstruction.cpp2
-rw-r--r--utils/TableGen/CodeGenInstruction.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp
index 6ab5f06dda..eea5561872 100644
--- a/utils/TableGen/CodeGenInstruction.cpp
+++ b/utils/TableGen/CodeGenInstruction.cpp
@@ -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!";
diff --git a/utils/TableGen/CodeGenInstruction.h b/utils/TableGen/CodeGenInstruction.h
index 8e7051bcda..c369123dd6 100644
--- a/utils/TableGen/CodeGenInstruction.h
+++ b/utils/TableGen/CodeGenInstruction.h
@@ -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;