diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-07 05:19:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-07 05:19:29 +0000 |
commit | 2fb37c02f194e3dc9a9804dc7860701c072ea052 (patch) | |
tree | 16e04d219c3d9795cc8154bcbea580bdb98ce055 /utils/TableGen | |
parent | bf010e363b1241dc32b149be66bde3ab8055c96f (diff) | |
download | external_llvm-2fb37c02f194e3dc9a9804dc7860701c072ea052.zip external_llvm-2fb37c02f194e3dc9a9804dc7860701c072ea052.tar.gz external_llvm-2fb37c02f194e3dc9a9804dc7860701c072ea052.tar.bz2 |
rename hasVariableOperands() -> isVariadic(). Add some comments.
Evan, please review the comments I added to getNumDefs to make sure
that they are accurate, thx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/CodeGenInstruction.cpp | 4 | ||||
-rw-r--r-- | utils/TableGen/CodeGenInstruction.h | 2 | ||||
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 2 | ||||
-rw-r--r-- | utils/TableGen/InstrInfoEmitter.cpp | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp index ea01d1b..daab065 100644 --- a/utils/TableGen/CodeGenInstruction.cpp +++ b/utils/TableGen/CodeGenInstruction.cpp @@ -99,7 +99,7 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) mayHaveSideEffects = R->getValueAsBit("mayHaveSideEffects"); neverHasSideEffects = R->getValueAsBit("neverHasSideEffects"); hasOptionalDef = false; - hasVariableNumberOfOperands = false; + isVariadic = false; if (mayHaveSideEffects && neverHasSideEffects) throw R->getName() + @@ -159,7 +159,7 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) else if (Rec->isSubClassOf("OptionalDefOperand")) hasOptionalDef = true; } else if (Rec->getName() == "variable_ops") { - hasVariableNumberOfOperands = true; + isVariadic = true; continue; } else if (!Rec->isSubClassOf("RegisterClass") && Rec->getName() != "ptr_rc") diff --git a/utils/TableGen/CodeGenInstruction.h b/utils/TableGen/CodeGenInstruction.h index 351a880..6f7a19e 100644 --- a/utils/TableGen/CodeGenInstruction.h +++ b/utils/TableGen/CodeGenInstruction.h @@ -99,7 +99,7 @@ namespace llvm { bool isReMaterializable; bool hasDelaySlot; bool usesCustomDAGSchedInserter; - bool hasVariableNumberOfOperands; + bool isVariadic; bool hasCtrlDep; bool isNotDuplicable; bool hasOptionalDef; diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index bd8d210..8502d61 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -835,7 +835,7 @@ public: if (InstPatNode && InstPatNode->getOperator()->getName() == "set") { InstPatNode = InstPatNode->getChild(InstPatNode->getNumChildren()-1); } - bool HasVarOps = isRoot && II.hasVariableNumberOfOperands; + bool HasVarOps = isRoot && II.isVariadic; // FIXME: fix how we deal with physical register operands. bool HasImpInputs = isRoot && Inst.getNumImpOperands() > 0; bool HasImpResults = isRoot && DstRegs.size() > 0; diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index 77ee860..51896b8 100644 --- a/utils/TableGen/InstrInfoEmitter.cpp +++ b/utils/TableGen/InstrInfoEmitter.cpp @@ -320,9 +320,9 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num, if (Inst.hasOptionalDef) OS << "|M_HAS_OPTIONAL_DEF"; if (Inst.usesCustomDAGSchedInserter) OS << "|M_USES_CUSTOM_DAG_SCHED_INSERTION"; - if (Inst.hasVariableNumberOfOperands) OS << "|M_VARIABLE_OPS"; - if (Inst.mayHaveSideEffects) OS << "|M_MAY_HAVE_SIDE_EFFECTS"; - if (NeverHasSideEffects) OS << "|M_NEVER_HAS_SIDE_EFFECTS"; + if (Inst.isVariadic) OS << "|M_VARIADIC"; + if (Inst.mayHaveSideEffects) OS << "|M_MAY_HAVE_SIDE_EFFECTS"; + if (NeverHasSideEffects) OS << "|M_NEVER_HAS_SIDE_EFFECTS"; OS << ", 0"; // Emit all of the target-specific flags... |