summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2018-04-05 15:29:52 +0000
committerManoj Gupta <manojgupta@google.com>2018-04-05 15:29:52 +0000
commit4b3eefa5e84484da29cd95df8c7c0946a07bc98a (patch)
treeb9b9adaa2d1faaf6a833980e332eff530cebca32 /clang/lib/Frontend/CompilerInvocation.cpp
parentbbf98aea83f725f59afcb5bdb4c4dec0b3a0f587 (diff)
downloadbcm5719-llvm-4b3eefa5e84484da29cd95df8c7c0946a07bc98a.tar.gz
bcm5719-llvm-4b3eefa5e84484da29cd95df8c7c0946a07bc98a.zip
Disable -fmerge-all-constants as default.
Summary: "-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. Reviewers: rjmccall, rsmith, chandlerc Reviewed By: rsmith, chandlerc Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D45289 llvm-svn: 329300
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 734349eed7a..45546ac3bc7 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -605,7 +605,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Args.hasFlag(OPT_ffine_grained_bitfield_accesses,
OPT_fno_fine_grained_bitfield_accesses, false);
Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
- Opts.MergeAllConstants = !Args.hasArg(OPT_fno_merge_all_constants);
+ Opts.MergeAllConstants = Args.hasArg(OPT_fmerge_all_constants);
Opts.NoCommon = Args.hasArg(OPT_fno_common);
Opts.NoImplicitFloat = Args.hasArg(OPT_no_implicit_float);
Opts.OptimizeSize = getOptimizationLevelSize(Args);
OpenPOWER on IntegriCloud