[PATCH] D149563: [TRE] don't escape callsite if its alloca argument is readonly
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 30 20:09:46 PDT 2023
efriedma requested changes to this revision.
efriedma added a comment.
This revision now requires changes to proceed.
A call cannot be marked `tail` if it may read or write to an alloca in the same function. There are basically two ways to to "read or write": either the pointer is passed as an argument, or it's captured.
For the function `@test16` in the given testcase, neither call can be marked `tail`. The call to `@use_readonly` can obviously read the alloca. The call to `@use_readonly` can also capture the address of the alloca, so the call to `@noarg` can also read the alloca.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149563/new/
https://reviews.llvm.org/D149563
More information about the llvm-commits
mailing list