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

Nadav Rotem nrotem at apple.com
Thu Oct 11 13:56:57 PDT 2012


Author: nadav
Date: Thu Oct 11 15:56:57 2012
New Revision: 165741

URL: http://llvm.org/viewvc/llvm-project?rev=165741&view=rev
Log:
Add TargetTransformInfo to the clang driver.


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=165741&r1=165740&r2=165741&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Thu Oct 11 15:56:57 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