]> granicus.if.org Git - clang/commitdiff
Reintroduce the TargetTransformInfo to the clang pass manager.
authorNadav Rotem <nrotem@apple.com>
Fri, 19 Oct 2012 04:15:32 +0000 (04:15 +0000)
committerNadav Rotem <nrotem@apple.com>
Fri, 19 Oct 2012 04:15:32 +0000 (04:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166263 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/BackendUtil.cpp

index 1abf24765836aac08fa0a0edc9b71ff3d9104ffd..262b844db34ed196926bb19e0a3873d413029fc8 100644 (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;