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 | f376c99ea046718e8ef9a9d73960888eb763afed (patch) | |
| tree | 5f10d2263da2bff78ec7371e1308b5ff2d2f7ed8 /llvm/lib | |
| parent | fd548c96ccad6ade17b3aa8b594e4e00bb9a0ed4 (diff) | |
| download | bcm5719-llvm-f376c99ea046718e8ef9a9d73960888eb763afed.tar.gz bcm5719-llvm-f376c99ea046718e8ef9a9d73960888eb763afed.zip | |
rename hasVariableOperands() -> isVariadic(). Add some comments.
Evan, please review the comments I added to getNumDefs to make sure
that they are accurate, thx.
llvm-svn: 45687
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86CodeEmitter.cpp | 3 |
3 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 99bc22230c3..d040bd45da0 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/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/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index 499c2c7286b..df6503fd144 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp +++ b/llvm/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 diff --git a/llvm/lib/Target/X86/X86CodeEmitter.cpp b/llvm/lib/Target/X86/X86CodeEmitter.cpp index c4461a751a1..d25ede168d8 100644 --- a/llvm/lib/Target/X86/X86CodeEmitter.cpp +++ b/llvm/lib/Target/X86/X86CodeEmitter.cpp @@ -799,6 +799,5 @@ void Emitter::emitInstruction(const MachineInstr &MI, break; } - assert((Desc->Flags & M_VARIABLE_OPS) != 0 || - CurOp == NumOps && "Unknown encoding!"); + assert((Desc->isVariadic() || CurOp == NumOps) && "Unknown encoding!"); } |

