[PATCH] D82085: [TRE] allow TRE for non-capturing calls.
Layton Kifer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 09:10:02 PDT 2020
laytonio added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:816
+ for (auto &BB : F) {
+ for (Instruction &I : BB) {
+ if (AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
----------------
You can use `for (Instruction &I : instructions(F))` here.
================
Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:830
+ !CI->isTailCall())
+ return false;
+ }
----------------
Is this correct? I think we want to check these per TRE candidate in findTRECandidate, not just disable TRE in general if one is found.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82085/new/
https://reviews.llvm.org/D82085
More information about the cfe-commits
mailing list