[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.
Florian Hahn via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 11 03:55:22 PDT 2020
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. Thanks @rjmccall
I also added the escape cases shared on cfe-dev by @rsmith
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85473/new/
https://reviews.llvm.org/D85473
Files:
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/CGCall.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/pass-by-value-noalias.c
clang/test/CodeGenCXX/pass-by-value-noalias.cpp
clang/test/CodeGenObjC/pass-by-value-noalias.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85473.291176.patch
Type: text/x-patch
Size: 6807 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200911/badb32bb/attachment-0001.bin>
More information about the cfe-commits
mailing list