diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-09-10 21:55:43 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-09-10 21:55:43 +0000 |
commit | 220e240bdf3235252c2a1fc8fcc5d4b8e8117918 (patch) | |
tree | 30e5da991361c851472bb12f4bb445e4fa6dab10 /include | |
parent | 51f5b67395780b8421f4aa6ee998ed51b23dae9d (diff) | |
download | external_llvm-220e240bdf3235252c2a1fc8fcc5d4b8e8117918.zip external_llvm-220e240bdf3235252c2a1fc8fcc5d4b8e8117918.tar.gz external_llvm-220e240bdf3235252c2a1fc8fcc5d4b8e8117918.tar.bz2 |
Modify the comparison optimizations in the peephole optimizer to update the
iterator when an optimization took place. This allows us to do more insane
things with the code than just remove an instruction or two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113640 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index 844b965..f465201 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -586,9 +586,11 @@ public: } /// ConvertToSetZeroFlag - Convert the instruction to set the zero flag so - /// that we can remove a "comparison with zero". - virtual bool ConvertToSetZeroFlag(MachineInstr *Instr, - MachineInstr *CmpInstr) const { + /// that we can remove a "comparison with zero". Update the iterator *only* + /// if a transformation took place. + virtual bool ConvertToSetZeroFlag(MachineInstr * /*Instr*/, + MachineInstr * /*CmpInstr*/, + MachineBasicBlock::iterator &) const { return false; } |