[PATCH] D78265: [AArch64ConditionOptimizer] Fix missed optimization due to debug insts [10/10]
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 03:23:25 PDT 2020
fhahn added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp:161
// Now find the instruction controlling the terminator.
for (MachineBasicBlock::iterator B = MBB->begin(); I != B;) {
+ I = prev_nodbg(I, MBB->begin());
----------------
Might be worth rewriting in terms of an iterator range, e.g. something like `reverseInstructionsWithoutDebug(I == MBB->begin() ? I : std::prev(I), MBB->begin())`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78265/new/
https://reviews.llvm.org/D78265
More information about the llvm-commits
mailing list