[PATCH] D112226: [TailDuplicator] Fix merging block with terminator
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 22 03:20:13 PDT 2021
sebastian-ne added inline comments.
================
Comment at: llvm/lib/CodeGen/TailDuplicator.cpp:974
+ } else {
+ LLVM_DEBUG(dbgs() << "Abort merging blocks, the predecessor still "
+ "contains terminator instructions");
----------------
foad wrote:
> Isn't there a danger that this will fall through to the code that updates phi nodes, even though we didn't merge anything?
No, this is just another condition for the if conditions above. I couldn’t add it there because `TII->removeBranch` needs to run first.
The phi updates only run for blocks in `TDBBs` and `PrevBB` is only added there inside the if.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112226/new/
https://reviews.llvm.org/D112226
More information about the llvm-commits
mailing list