[PATCH] D62555: [TailDuplicator] prevent tail duplication for INLINEASM_BR
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 14:49:38 PDT 2019
nickdesaulniers marked 3 inline comments as done.
nickdesaulniers added inline comments.
Comment at: llvm/lib/CodeGen/TailDuplicator.cpp:784
+ for (MachineInstr &I : *TailBB)
+ if (I.getOpcode() == TargetOpcode::INLINEASM_BR)
> Is the INLINEASM_BR more likely to terminate the basic block, if it is then maybe a reverse iterator will find them faster? Although I suspect that most basic blocks won't contain any so it won't matter much anyway.
Looks like there's a `TailDuplicator::canTailDuplicate` and a `TailDuplicator::shouldTailDuplicate`. `TailDuplicator::shouldTailDuplicate` runs earlier and iterates all `MachineInstr`s in the `MachineBasicBlock`. While the iteration order is front to back, moving this check there solves @craig.topper 's point about the the `TailBB` be repeatedly analyzed.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the llvm-commits