[cfe-commits] r166263 - /cfe/trunk/lib/CodeGen/BackendUtil.cpp

Nadav Rotem nrotem at apple.com
Thu Oct 18 21:15:32 PDT 2012


Author: nadav
Date: Thu Oct 18 23:15:32 2012
New Revision: 166263

URL: http://llvm.org/viewvc/llvm-project?rev=166263&view=rev
Log:
Reintroduce the TargetTransformInfo to the clang pass manager.


Modified:
    cfe/trunk/lib/CodeGen/BackendUtil.cpp

Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=166263&r1=166262&r2=166263&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Thu Oct 18 23:15:32 2012
@@ -361,7 +361,7 @@
     break;
   case LangOptions::FPC_Fast:
     Options.AllowFPOpFusion = llvm::FPOpFusion::Fast;
-    break;              
+    break;
   }
 
   Options.LessPreciseFPMADOption = CodeGenOpts.LessPreciseFPMAD;
@@ -401,6 +401,10 @@
     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;





More information about the cfe-commits mailing list