[PATCH] D67342: [Attributor][Fix] Manifest nocapture only in CSArgument or Argument
Hideto Ueno via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 23:52:05 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL371589: [Attributor][Fix] Manifest nocapture only in CSArgument or Argument (authored by uenoku, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D67342?vs=219298&id=219662#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67342/new/
https://reviews.llvm.org/D67342
Files:
llvm/trunk/lib/Transforms/IPO/Attributor.cpp
Index: llvm/trunk/lib/Transforms/IPO/Attributor.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/Attributor.cpp
+++ llvm/trunk/lib/Transforms/IPO/Attributor.cpp
@@ -2594,10 +2594,12 @@
if (!isAssumedNoCaptureMaybeReturned())
return;
- if (isAssumedNoCapture())
- Attrs.emplace_back(Attribute::get(Ctx, Attribute::NoCapture));
- else if (ManifestInternal)
- Attrs.emplace_back(Attribute::get(Ctx, "no-capture-maybe-returned"));
+ if (getArgNo() >= 0) {
+ if (isAssumedNoCapture())
+ Attrs.emplace_back(Attribute::get(Ctx, Attribute::NoCapture));
+ else if (ManifestInternal)
+ Attrs.emplace_back(Attribute::get(Ctx, "no-capture-maybe-returned"));
+ }
}
/// Set the NOT_CAPTURED_IN_MEM and NOT_CAPTURED_IN_RET bits in \p Known
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67342.219662.patch
Type: text/x-patch
Size: 850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190911/f80f68e4/attachment.bin>
More information about the llvm-commits
mailing list