capture implicit uses and defs in CodeGenInstruction

llvm-svn: 98879
This commit is contained in:
Chris Lattner 2010-03-18 21:42:03 +00:00
parent e56c353eb1
commit 2130a3e0af
2 changed files with 6 additions and 0 deletions

View 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!";

View 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;