[PATCH] D57953: [Jump Threading] Convert conditional branches into unconditional branches using GVN results
Brian Rzycki via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 21 10:54:48 PST 2019
brzycki added inline comments.
================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:732
+ if (SuccBB0 != SuccBB1 && SuccBB0 != BB && SuccBB1 != BB) {
+ if (ThreadEdge(BB, Preds1, SuccBB1)) {
+ SuccBB1->removePredecessor(BB);
----------------
sebpop wrote:
> As the code generation relies on `threadEdge`, you could factor it out from this file and make it usable from other passes.
>
+1. A suitable location for this would be `llvm/lib/Transforms/Utils/Local.cpp`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57953/new/
https://reviews.llvm.org/D57953
More information about the llvm-commits
mailing list