summaryrefslogtreecommitdiffstats
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
commit2130a3e0af723bf92c0c21b7a2cca9ed38e12e33 (patch)
tree5454888ceb5827085b3bf42fa9ca6e95127a7c0f
parente56c353eb1ad8b868f09e87e2871958a56837b04 (diff)
downloadbcm5719-llvm-2130a3e0af723bf92c0c21b7a2cca9ed38e12e33.tar.gz
bcm5719-llvm-2130a3e0af723bf92c0c21b7a2cca9ed38e12e33.zip
capture implicit uses and defs in CodeGenInstruction
llvm-svn: 98879
-rw-r--r--llvm/utils/TableGen/CodeGenInstruction.cpp2
-rw-r--r--llvm/utils/TableGen/CodeGenInstruction.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp
index 6ab5f06dda7..eea55618721 100644
--- a/llvm/utils/TableGen/CodeGenInstruction.cpp
+++ b/llvm/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/llvm/utils/TableGen/CodeGenInstruction.h b/llvm/utils/TableGen/CodeGenInstruction.h
index 8e7051bcda2..c369123dd69 100644
--- a/llvm/utils/TableGen/CodeGenInstruction.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud