[cfe-commits] r90117 - in /cfe/trunk: include/clang/CodeGen/CodeGenOptions.h lib/Driver/CC1Options.cpp lib/Frontend/Backend.cpp tools/clang-cc/Options.cpp
Daniel Dunbar
daniel at zuster.org
Mon Nov 30 00:39:32 PST 2009
Author: ddunbar
Date: Mon Nov 30 02:39:32 2009
New Revision: 90117
URL: http://llvm.org/viewvc/llvm-project?rev=90117&view=rev
Log:
Eliminate CodeGenOptions::SimplifyLibCalls.
Modified:
cfe/trunk/include/clang/CodeGen/CodeGenOptions.h
cfe/trunk/lib/Driver/CC1Options.cpp
cfe/trunk/lib/Frontend/Backend.cpp
cfe/trunk/tools/clang-cc/Options.cpp
Modified: cfe/trunk/include/clang/CodeGen/CodeGenOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/CodeGenOptions.h?rev=90117&r1=90116&r2=90117&view=diff
==============================================================================
--- cfe/trunk/include/clang/CodeGen/CodeGenOptions.h (original)
+++ cfe/trunk/include/clang/CodeGen/CodeGenOptions.h Mon Nov 30 02:39:32 2009
@@ -43,8 +43,6 @@
unsigned NoZeroInitializedInBSS : 1; /// -fno-zero-initialized-in-bss
unsigned OptimizationLevel : 3; /// The -O[0-4] option specified.
unsigned OptimizeSize : 1; /// If -Os is specified.
- unsigned SimplifyLibCalls : 1; /// Should standard library calls be treated
- /// specially.
unsigned TimePasses : 1; /// Set when -ftime-report is enabled.
unsigned UnitAtATime : 1; /// Unused. For mirroring GCC optimization
/// selection.
@@ -85,7 +83,7 @@
NoZeroInitializedInBSS = 0;
OptimizationLevel = 0;
OptimizeSize = 0;
- SimplifyLibCalls = UnrollLoops = 0;
+ UnrollLoops = 0;
TimePasses = 0;
UnitAtATime = 1;
UnwindTables = 0;
Modified: cfe/trunk/lib/Driver/CC1Options.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CC1Options.cpp?rev=90117&r1=90116&r2=90117&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/CC1Options.cpp (original)
+++ cfe/trunk/lib/Driver/CC1Options.cpp Mon Nov 30 02:39:32 2009
@@ -177,7 +177,6 @@
Opts.NoCommon = Args.hasArg(OPT_fno_common);
Opts.NoImplicitFloat = Args.hasArg(OPT_no_implicit_float);
Opts.OptimizeSize = Args.hasArg(OPT_Os);
- Opts.SimplifyLibCalls = 1;
Opts.UnrollLoops = (Opts.OptimizationLevel > 1 && !Opts.OptimizeSize);
Opts.AsmVerbose = Args.hasArg(OPT_masm_verbose);
@@ -193,8 +192,6 @@
// FIXME: Implement!
// FIXME: Eliminate this dependency?
-// if (Lang.NoBuiltin)
-// Opts.SimplifyLibCalls = 0;
// if (Lang.CPlusPlus)
// Opts.NoCommon = 1;
// Opts.TimePasses = TimePasses;
Modified: cfe/trunk/lib/Frontend/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Backend.cpp?rev=90117&r1=90116&r2=90117&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Backend.cpp (original)
+++ cfe/trunk/lib/Frontend/Backend.cpp Mon Nov 30 02:39:32 2009
@@ -38,8 +38,9 @@
namespace {
class BackendConsumer : public ASTConsumer {
BackendAction Action;
- CodeGenOptions CodeGenOpts;
- TargetOptions TargetOpts;
+ const CodeGenOptions &CodeGenOpts;
+ const LangOptions &LangOpts;
+ const TargetOptions &TargetOpts;
llvm::raw_ostream *AsmOutStream;
llvm::formatted_raw_ostream FormattedOutStream;
ASTContext *Context;
@@ -79,6 +80,7 @@
llvm::raw_ostream* OS, LLVMContext& C) :
Action(action),
CodeGenOpts(compopts),
+ LangOpts(langopts),
TargetOpts(targetopts),
AsmOutStream(OS),
LLVMIRGeneration("LLVM IR Generation Time"),
@@ -249,7 +251,7 @@
if (TargetOpts.CPU.size() || TargetOpts.Features.size()) {
SubtargetFeatures Features;
Features.setCPU(TargetOpts.CPU);
- for (std::vector<std::string>::iterator
+ for (std::vector<std::string>::const_iterator
it = TargetOpts.Features.begin(),
ie = TargetOpts.Features.end(); it != ie; ++it)
Features.AddFeature(*it);
@@ -336,7 +338,7 @@
llvm::createStandardModulePasses(PM, OptLevel, CodeGenOpts.OptimizeSize,
CodeGenOpts.UnitAtATime,
CodeGenOpts.UnrollLoops,
- CodeGenOpts.SimplifyLibCalls,
+ /*SimplifyLibCalls=*/!LangOpts.NoBuiltin,
/*HaveExceptions=*/true,
InliningPass);
}
Modified: cfe/trunk/tools/clang-cc/Options.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/Options.cpp?rev=90117&r1=90116&r2=90117&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/Options.cpp (original)
+++ cfe/trunk/tools/clang-cc/Options.cpp Mon Nov 30 02:39:32 2009
@@ -814,7 +814,6 @@
Opts.NoCommon = NoCommon;
Opts.NoImplicitFloat = NoImplicitFloat;
Opts.OptimizeSize = OptSize;
- Opts.SimplifyLibCalls = 1;
Opts.UnrollLoops = (Opts.OptimizationLevel > 1 && !OptSize);
// LLVM Code Generator options.
@@ -829,8 +828,6 @@
Opts.RelocationModel = MRelocationModel;
// FIXME: Eliminate this dependency?
- if (Lang.NoBuiltin)
- Opts.SimplifyLibCalls = 0;
if (Lang.CPlusPlus)
Opts.NoCommon = 1;
Opts.TimePasses = TimePasses;
More information about the cfe-commits
mailing list