[PATCH] D27792: IfConversion: Use reverse_iterator to simplify. NFC
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 15:39:33 PST 2017
fhahn added a comment.
Comment at: lib/CodeGen/IfConversion.cpp:647
+ // We have to do our own shifting so that we get the same range.
+ MachineBasicBlock::reverse_iterator RTIE = std::next(TIE.getReverse());
+ MachineBasicBlock::reverse_iterator RFIE = std::next(FIE.getReverse());
> dblaikie wrote:
> > This construct is used rather than this:
> > MachineBasicBlock::reverse_iterator RTIE = TIE;
> > to avoid depending on that conversion & it's subtle off-by-one jump?
> Currently, there is no such conversion in ilist_iterator, only a getReverse() method, that doesn't perform an off-by-one jump.
That makes sense. @dblaikie do you think we should check with Duncan before committing this?
More information about the llvm-commits