"-fmerge-all-constants" is a non-conforming optimization and should not
be the default. It is also causing miscompiles when building Linux
Kernel (https://lkml.org/lkml/2018/3/20/872).
Fixes PR18538.
Paths
| Differential D45289
Disable -fmerge-all-constants as default. ClosedPublic Authored by manojgupta on Apr 4 2018, 2:24 PM.
Details Summary "-fmerge-all-constants" is a non-conforming optimization and should not Fixes PR18538.
Diff Detail
Event TimelineComment Actions One minor change, then this looks good to me. Thank you!
This revision is now accepted and ready to land.Apr 4 2018, 2:30 PM Comment Actions Just wanted to explicitly say +1 to this default change (with the adjustment Richard suggested). Also, John already said +1 to this default change on the bug. Comment Actions Thanks a lot for the quick review! Comment Actions It's not unreasonable to just add -fmerge-all-constants to the command line invocations for the individual tests, yeah. We can take those off as necessary later.
Closed by commit rC329300: Disable -fmerge-all-constants as default. (authored by manojgupta). · Explain WhyApr 5 2018, 8:35 AM Closed by commit rL329300: Disable -fmerge-all-constants as default. (authored by manojgupta). · Explain Why This revision was automatically updated to reflect the committed changes. This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 141164 include/clang/Driver/Options.td
lib/AST/ExprConstant.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/array-init.c
test/CodeGen/decl.c
test/CodeGenCXX/const-init-cxx11.cpp
test/CodeGenCXX/cxx0x-initializer-references.cpp
test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
test/CodeGenObjCXX/arc-cxx11-init-list.mm
test/Driver/clang_f_opts.c
|
Remove the Flags<[CC1Option]> here, since -cc1 no longer understands this flag.