aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-07 05:19:29 +0000
committerChris Lattner <sabre@nondot.org>2008-01-07 05:19:29 +0000
commit8f707e15fbd09ca948b86419bcb0c92470827ac9 (patch)
tree16e04d219c3d9795cc8154bcbea580bdb98ce055 /lib/CodeGen
parent4764189298b17432f79f01f4b707fc0a0ba33a3c (diff)
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 'lib/CodeGen')
-rw-r--r--lib/CodeGen/MachineInstr.cpp5
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAG.cpp4
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 99bc22230c..d040bd45da 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -488,8 +488,7 @@ MachineInstr *MachineInstr::removeFromParent() {
///
bool MachineInstr::OperandsComplete() const {
unsigned short NumOperands = TID->getNumOperands();
- if (TID->hasVariableOperands() == 0 &&
- getNumOperands()-NumImplicitOps >= NumOperands)
+ if (!TID->isVariadic() && getNumOperands()-NumImplicitOps >= NumOperands)
return true; // Broken: we have all the operands of this instruction!
return false;
}
@@ -498,7 +497,7 @@ bool MachineInstr::OperandsComplete() const {
///
unsigned MachineInstr::getNumExplicitOperands() const {
unsigned NumOperands = TID->getNumOperands();
- if (TID->hasVariableOperands() == 0)
+ if (!TID->isVariadic())
return NumOperands;
for (unsigned e = getNumOperands(); NumOperands != e; ++NumOperands) {
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 499c2c7286..df6503fd14 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -294,7 +294,7 @@ static const TargetRegisterClass *getInstrOperandRegClass(
const TargetInstrDescriptor *II,
unsigned Op) {
if (Op >= II->getNumOperands()) {
- assert((II->Flags & M_VARIABLE_OPS)&& "Invalid operand # of instruction");
+ assert(II->isVariadic() && "Invalid operand # of instruction");
return NULL;
}
if (II->OpInfo[Op].isLookupPtrRegClass())
@@ -678,7 +678,7 @@ void ScheduleDAG::EmitNode(SDNode *Node, unsigned InstanceNo,
II.getImplicitDefs() != 0;
#ifndef NDEBUG
assert((II.getNumOperands() == NumMIOperands ||
- HasPhysRegOuts || II.hasVariableOperands()) &&
+ HasPhysRegOuts || II.isVariadic()) &&
"#operands for dag node doesn't match .td file!");
#endif