forked from OSchip/llvm-project
Eliminate CodeGenOptions::SimplifyLibCalls.
llvm-svn: 90117
This commit is contained in:
parent
7348432ade
commit
de18224d9c
|
@ -43,8 +43,6 @@ public:
|
|||
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 @@ public:
|
|||
NoZeroInitializedInBSS = 0;
|
||||
OptimizationLevel = 0;
|
||||
OptimizeSize = 0;
|
||||
SimplifyLibCalls = UnrollLoops = 0;
|
||||
UnrollLoops = 0;
|
||||
TimePasses = 0;
|
||||
UnitAtATime = 1;
|
||||
UnwindTables = 0;
|
||||
|
|
|
@ -177,7 +177,6 @@ static void ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
|
|||
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 @@ static void ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
|
|||
|
||||
// FIXME: Implement!
|
||||
// FIXME: Eliminate this dependency?
|
||||
// if (Lang.NoBuiltin)
|
||||
// Opts.SimplifyLibCalls = 0;
|
||||
// if (Lang.CPlusPlus)
|
||||
// Opts.NoCommon = 1;
|
||||
// Opts.TimePasses = TimePasses;
|
||||
|
|
|
@ -38,8 +38,9 @@ using namespace llvm;
|
|||
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 @@ namespace {
|
|||
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 @@ bool BackendConsumer::AddEmitPasses(std::string &Error) {
|
|||
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 @@ void BackendConsumer::CreatePasses() {
|
|||
llvm::createStandardModulePasses(PM, OptLevel, CodeGenOpts.OptimizeSize,
|
||||
CodeGenOpts.UnitAtATime,
|
||||
CodeGenOpts.UnrollLoops,
|
||||
CodeGenOpts.SimplifyLibCalls,
|
||||
/*SimplifyLibCalls=*/!LangOpts.NoBuiltin,
|
||||
/*HaveExceptions=*/true,
|
||||
InliningPass);
|
||||
}
|
||||
|
|
|
@ -814,7 +814,6 @@ void clang::InitializeCodeGenOptions(CodeGenOptions &Opts,
|
|||
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 @@ void clang::InitializeCodeGenOptions(CodeGenOptions &Opts,
|
|||
Opts.RelocationModel = MRelocationModel;
|
||||
|
||||
// FIXME: Eliminate this dependency?
|
||||
if (Lang.NoBuiltin)
|
||||
Opts.SimplifyLibCalls = 0;
|
||||
if (Lang.CPlusPlus)
|
||||
Opts.NoCommon = 1;
|
||||
Opts.TimePasses = TimePasses;
|
||||
|
|
Loading…
Reference in New Issue