[PATCH] D91928: [nvptx] Skip alloca for read-only byval arguments.
Michael Liao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 21 23:55:35 PST 2020
hliao added a comment.
It turns out that the simplest way is to skip generating `alloca` once that byval argument is `readonly`. As `readonly` will be attributed once there's no write to that argument, it's safe to just cast that pointer to the parameter space if it has `readonly`. Basically, that argument lowering pass does a similar to D91590 <https://reviews.llvm.org/D91590> but, instead, applies that in the backend. I verified that, for that simple test CUDA code, it would generate the same SASS.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91928/new/
https://reviews.llvm.org/D91928
More information about the llvm-commits
mailing list