Reintroduce the TargetTransformInfo to the clang pass manager.

llvm-svn: 166263
This commit is contained in:
Nadav Rotem 2012-10-19 04:15:32 +00:00
parent 87a04b2445
commit e9c233b1c5
1 changed files with 5 additions and 1 deletions

View File

@ -361,7 +361,7 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action,
break;
case LangOptions::FPC_Fast:
Options.AllowFPOpFusion = llvm::FPOpFusion::Fast;
break;
break;
}
Options.LessPreciseFPMADOption = CodeGenOpts.LessPreciseFPMAD;
@ -401,6 +401,10 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action,
TLI->disableAllFunctions();
PM->add(TLI);
// Add TargetTransformInfo.
PM->add(new TargetTransformInfo(TM->getScalarTargetTransformInfo(),
TM->getVectorTargetTransformInfo()));
// Normal mode, emit a .s or .o file by running the code generator. Note,
// this also adds codegenerator level optimization passes.
TargetMachine::CodeGenFileType CGFT = TargetMachine::CGFT_AssemblyFile;