[PATCH] D80951: [GlobalOpt] Remove preallocated calls when possible
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 1 14:05:42 PDT 2020
aeubanks created this revision.
aeubanks added reviewers: efriedma, hans.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
aeubanks marked an inline comment as done.
aeubanks added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:2288
+ for (auto *It = OpBundles.begin(); It != OpBundles.end(); ++It) {
+ if (It->getTag() == "preallocated") {
+ PreallocatedToken = *It->input_begin();
----------------
I couldn't figure out how to remove the preallocated operand bundle any better than this, suggestions greatly appreciated
When possible (e.g. internal linkage), strip preallocated attribute off
parameters/arguments.
This requires removing the "preallocated" operand bundle from the call
site, replacing @llvm.call.preallocated.arg() with an alloca and a
bitcast to i8*, and removing the @llvm.call.preallocated.setup().
This sort of transformation may need to be moved to somewhere more
accessible to accomodate similar transformations like inlining in the
future.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80951
Files:
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/Transforms/GlobalOpt/fastcc.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80951.267720.patch
Type: text/x-patch
Size: 4575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200601/ff7a1659/attachment.bin>
More information about the llvm-commits
mailing list