[PATCH] D151644: [InstCombine] Propegating `nocapture` flag to callsites
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 31 14:28:49 PDT 2023
goldstein.w.n added a comment.
@nikic, okay I re-implemented to be as conservative as possible.
Fail on:
1. Any alloca/leaked malloc that may reach that callsite
2. Any may-read on a value derived from the return value.
I think later on we can improve the alloca/malloc cases if after the callsite there are no loads or the callsite is readonly, but for now I think this should cover all the bases.
The only thing is maybe we need nothrow as well? Or at least need a nothrow if the caller has a catch (if the caller doesn't have a catch then the nocapture on caller should apply). What do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151644/new/
https://reviews.llvm.org/D151644
More information about the llvm-commits
mailing list