diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 5 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | 4 | ||||
-rw-r--r-- | lib/Target/X86/X86CodeEmitter.cpp | 3 |
3 files changed, 5 insertions, 7 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 99bc222..d040bd4 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 499c2c7..df6503f 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 diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp index c4461a7..d25ede1 100644 --- a/lib/Target/X86/X86CodeEmitter.cpp +++ b/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!"); } |