From 25030c46223f117f5d77936d3e5d0502a5c42e63 Mon Sep 17 00:00:00 2001 From: Nadav Rotem Date: Fri, 19 Oct 2012 04:15:32 +0000 Subject: [PATCH] Reintroduce the TargetTransformInfo to the clang pass manager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166263 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/BackendUtil.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 1abf247658..262b844db3 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -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; -- 2.40.0