[PATCH] D38479: Make -mgeneral-regs-only more like GCC's
George Burgess IV via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 16 18:25:26 PDT 2019
george.burgess.iv updated this revision to Diff 220416.
george.burgess.iv marked 4 inline comments as done.
george.burgess.iv added a reviewer: efriedma.
george.burgess.iv added a comment.
Chatted with Eli offline; updated here to reflect the conclusions of that.
Importantly, this patch readds some of the peepholes we try to not diagnose, since the target users of this quite commonly do things that, after macro expansion, fold into e.g., `(int)(3.0 + 1)`. By wrapping these into `ConstantExpr`s at the cast point, we get our nice guaranteed lowering to 0 FP/vector ops in IR.
Similarly for struct assignment, I couldn't find a way to get an assignment of a struct of multiple fields to turn into a not-memcpy, so it seems safe to me to keep that around. I have tests to this effect, and am happy to add more if people can think of cases these tests may not adequately cover.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D38479/new/
https://reviews.llvm.org/D38479
Files:
clang/docs/UsersManual.rst
clang/include/clang/AST/Expr.h
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Sema/Sema.h
clang/lib/AST/Expr.cpp
clang/lib/Driver/ToolChains/Arch/AArch64.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaCast.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/test/CodeGen/aarch64-mgeneral_regs_only.c
clang/test/Sema/aarch64-mgeneral_regs_only.c
clang/test/SemaCXX/aarch64-mgeneral_regs_only.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38479.220416.patch
Type: text/x-patch
Size: 41468 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190917/1dfd3044/attachment-0001.bin>
More information about the cfe-commits
mailing list