fhahn created this revision.
fhahn added reviewers: rjmccall, rsmith, hfinkel, jfb.
Herald added subscribers: dang, dexonsmith.
Herald added a project: clang.
fhahn requested review of this revision.
After the recent discussion on cfe-dev 'Can indirect class parameters be
noalias?' [1], it seems l
rsmith added inline comments.
Comment at: clang/include/clang/Basic/LangOptions.def:371-374
+LANGOPT(PassByValueNoAlias, 1, 0, "Allows assuming no references to passed by "
+ "value escape before transferring execution "
+
fhahn updated this revision to Diff 283837.
fhahn added a comment.
Thanks for taking a look!
I adjusted the LangOpts description and added the flag to f_Group, as suggested.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85473/new/
https://reviews.
fhahn added a comment.
ping
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85473/new/
https://reviews.llvm.org/D85473
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
fhahn added a comment.
ping :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85473/new/
https://reviews.llvm.org/D85473
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
fhahn added a comment.
ping :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85473/new/
https://reviews.llvm.org/D85473
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
rjmccall added a comment.
Is it acceptable to leave this as a -cc1 option while we're pursuing this with
the language committee? Do we have any intent to pursue this with the language
committee?
Comment at: clang/include/clang/Basic/LangOptions.def:372
+LANGOPT(PassByValueIs
fhahn updated this revision to Diff 290504.
fhahn marked an inline comment as done.
fhahn added a comment.
Change to codegen option, adjust description for option, limit to trivially
copyable types in C++, add corresponding test cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST A
fhahn added inline comments.
Comment at: clang/include/clang/Driver/Options.td:4287-4290
+def fpass_by_value_noalias: Flag<["-"], "fpass-by-value-noalias">,
+ HelpText<"Allows assuming no references to passed by value escape before "
+ "transferring execution to the ca
fhahn updated this revision to Diff 291083.
fhahn added a comment.
Also restrict to types that are `isNonTrivialToPrimitiveCopy`, so we do not add
noalias for problematic types, like ObjC structs with weak references.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://re
rjmccall added a reviewer: ahatanak.
rjmccall added inline comments.
Comment at: clang/lib/CodeGen/CGCall.cpp:2198
+// reference to the underlying object. Mark it accordingly.
+Attrs.addAttribute(llvm::Attribute::NoAlias);
+
fhahn wrote:
> rjmccal
fhahn updated this revision to Diff 291176.
fhahn added a comment.
Update code to limit adding noalias to types with `getArgPassingRestrictions()
== RecordDecl::APK_CanPassInRegs`. This rules out problematic types, like ones
with non-trivial constructors or ObjC structs with weak pointers. Thank
fhahn marked an inline comment as done.
fhahn added inline comments.
Comment at: clang/lib/CodeGen/CGCall.cpp:2198
+// reference to the underlying object. Mark it accordingly.
+Attrs.addAttribute(llvm::Attribute::NoAlias);
+
rjmccall wrote:
> fhah
fhahn updated this revision to Diff 291183.
fhahn marked an inline comment as done.
fhahn added a comment.
Add check lines for escape examples. Note that for return-by-value we already
add noalias to the pointer unconditionally.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Just a minor tweak and then LGTM.
Comment at: clang/include/clang/Driver/Options.td:4287-4290
+def fpass_by_value_noalias: Flag<["-"], "fpass-by-value-noalias">,
+ HelpT
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa874d6334409: [Clang] Add option to allow marking
pass-by-value args as noalias. (authored by fhahn).
Changed prior to commit:
https://reviews.llv
fhahn added inline comments.
Comment at: clang/include/clang/Driver/Options.td:4287-4290
+def fpass_by_value_noalias: Flag<["-"], "fpass-by-value-noalias">,
+ HelpText<"Allows assuming no references to passed by value escape before "
+ "transferring execution to the ca
17 matches
Mail list logo