[PATCH] D82269: [TRE][NFC] Refactor Basic Block Processing
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 22 19:52:52 PDT 2020
efriedma added a comment.
Do we want to land this before D82085 <https://reviews.llvm.org/D82085>?
Otherwise, LGTM
================
Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:774
+ // eliminateCall will attempt to remove.
+ if (!Succ->hasAddressTaken() && pred_begin(Succ) == pred_end(Succ))
+ DTU.deleteBB(Succ);
----------------
I'm pretty sure the address-taken check here is wrong, and this doesn't interact correctly with unreachable code. Probably we should teach eliminateCall to RAUW away dead uses instead, and then let some other code call removeUnreachableBlocks to do the cleanup properly.
I guess this isn't new code, though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82269/new/
https://reviews.llvm.org/D82269
More information about the llvm-commits
mailing list