summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-04-25 07:24:13 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-04-25 07:24:13 +0000
commitcdee1c4272d4c87292116fe3edf1bc85f50d6040 (patch)
tree5f4928fa048c0ff63ac5b03dc6bd2de35b11a653 /include/llvm/CodeGen/MachineInstr.h
parent92efbfcd2d2309aedbab4a1269763c3de96219d4 (diff)
downloadllvm-cdee1c4272d4c87292116fe3edf1bc85f50d6040.tar.gz
llvm-cdee1c4272d4c87292116fe3edf1bc85f50d6040.tar.bz2
llvm-cdee1c4272d4c87292116fe3edf1bc85f50d6040.tar.xz
Minor speed tweak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index f6eaac0758..4f252673e7 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -517,13 +517,12 @@ private:
MachineOperand &AddNewOperand(bool IsImp = false) {
assert((IsImp || !OperandsComplete()) &&
"Trying to add an operand to a machine instr that is already done!");
- if (NumImplicitOps == 0) { // This is true most of the time.
+ if (IsImp || NumImplicitOps == 0) { // This is true most of the time.
Operands.push_back(MachineOperand());
return Operands.back();
- } else {
- return *Operands.insert(Operands.begin()+Operands.size()-NumImplicitOps,
- MachineOperand());
}
+ return *Operands.insert(Operands.begin()+Operands.size()-NumImplicitOps,
+ MachineOperand());
}
/// addImplicitDefUseOperands - Add all implicit def and use operands to