This commit is contained in:
Axel Naumann 2017-03-27 16:41:26 +02:00 committed by sftnight
parent 3a0bd332e8
commit 728c296cb0
2 changed files with 21 additions and 22 deletions

View File

@ -42,9 +42,9 @@ void BackendPasses::CreatePasses(llvm::Module& M)
// DON'T: we will not find our symbols...
//CGOpts_.CXXCtorDtorAliases = 1;
#if 0
// Default clang -O2 on Linux 64bit also has the following, but see
// CIFactory.cpp.
#if 0
CGOpts_.DisableFPElim = 0;
CGOpts_.DiscardValueNames = 1;
CGOpts_.OmitLeafFramePointer = 1;
@ -95,8 +95,8 @@ void BackendPasses::CreatePasses(llvm::Module& M)
break;
}
case CodeGenOptions::NormalInlining: {
PMBuilder.Inliner = createFunctionInliningPass(OptLevel,
m_CGOpts.OptimizeSize);
PMBuilder.Inliner =
createFunctionInliningPass(OptLevel, m_CGOpts.OptimizeSize);
break;
}
case CodeGenOptions::OnlyAlwaysInlining:

View File

@ -926,29 +926,28 @@ static void stringifyPreprocSetting(PreprocessorOptions& PPOpts,
CodeCompleteConsumer* CCC = 0;
CI->createSema(TU_Complete, CCC);
// Set CodeGen options
// want debug info
// Set CodeGen options.
CodeGenOptions& CGOpts = CI->getCodeGenOpts();
#ifdef _MSC_VER
CI->getCodeGenOpts().MSVolatile = 1;
CI->getCodeGenOpts().RelaxedAliasing = 1;
CI->getCodeGenOpts().EmitCodeView = 1;
CI->getCodeGenOpts().CXXCtorDtorAliases = 1;
CGOpts.MSVolatile = 1;
CGOpts.RelaxedAliasing = 1;
CGOpts.EmitCodeView = 1;
CGOpts.CXXCtorDtorAliases = 1;
#endif
// Reduce amount of emitted symbols by optimizing more.
CI->getCodeGenOpts().OptimizationLevel = 2;
// Reduce amount of emitted symbols by optimizing more.
CGOpts.OptimizationLevel = 2;
// Taken from a -O2 run of clang:
CI->getCodeGenOpts().DiscardValueNames = 1;
CI->getCodeGenOpts().OmitLeafFramePointer = 1;
CI->getCodeGenOpts().UnrollLoops = 1;
CI->getCodeGenOpts().VectorizeLoop = 1;
CI->getCodeGenOpts().VectorizeSLP = 1;
CGOpts.DiscardValueNames = 1;
CGOpts.OmitLeafFramePointer = 1;
CGOpts.UnrollLoops = 1;
CGOpts.VectorizeLoop = 1;
CGOpts.VectorizeSLP = 1;
//CI->getCodeGenOpts().setDebugInfo(clang::CodeGenOptions::FullDebugInfo);
// CI->getCodeGenOpts().EmitDeclMetadata = 1; // For unloading, for later
CI->getCodeGenOpts().CXXCtorDtorAliases = 0; // aliasing the complete
// ctor to the base ctor causes
// the JIT to crash
CI->getCodeGenOpts().VerifyModule = 0; // takes too long
// CGOpts.setDebugInfo(clang::CodeGenOptions::FullDebugInfo);
// CGOpts.EmitDeclMetadata = 1; // For unloading, for later
// aliasing the complete ctor to the base ctor causes the JIT to crash
CGOpts.CXXCtorDtorAliases = 0;
CGOpts.VerifyModule = 0; // takes too long
if (!OnlyLex) {
// -nobuiltininc