[cfe-commits] r171622 - /cfe/trunk/lib/CodeGen/BackendUtil.cpp
Chandler Carruth
chandlerc at gmail.com
Sat Jan 5 03:45:12 PST 2013
Author: chandlerc
Date: Sat Jan 5 05:45:12 2013
New Revision: 171622
URL: http://llvm.org/viewvc/llvm-project?rev=171622&view=rev
Log:
Companion patch to r171621 which changed the interface for creating TTI
passes to a create-pass function instead of a direct constructor call.
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=171622&r1=171621&r2=171622&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Sat Jan 5 05:45:12 2013
@@ -61,10 +61,8 @@
CodeGenPasses->add(new DataLayout(TheModule));
// Add TargetTransformInfo.
if (TM) {
- TargetTransformInfo *TTI =
- new TargetTransformInfo(TM->getScalarTargetTransformInfo(),
- TM->getVectorTargetTransformInfo());
- CodeGenPasses->add(TTI);
+ CodeGenPasses->add(createNoTTIPass(TM->getScalarTargetTransformInfo(),
+ TM->getVectorTargetTransformInfo()));
}
}
return CodeGenPasses;
@@ -75,10 +73,9 @@
PerModulePasses = new PassManager();
PerModulePasses->add(new DataLayout(TheModule));
if (TM) {
- TargetTransformInfo *TTI =
- new TargetTransformInfo(TM->getScalarTargetTransformInfo(),
- TM->getVectorTargetTransformInfo());
- PerModulePasses->add(TTI);
+ PerModulePasses->add(
+ createNoTTIPass(TM->getScalarTargetTransformInfo(),
+ TM->getVectorTargetTransformInfo()));
}
}
return PerModulePasses;
@@ -89,10 +86,9 @@
PerFunctionPasses = new FunctionPassManager(TheModule);
PerFunctionPasses->add(new DataLayout(TheModule));
if (TM) {
- TargetTransformInfo *TTI =
- new TargetTransformInfo(TM->getScalarTargetTransformInfo(),
- TM->getVectorTargetTransformInfo());
- PerFunctionPasses->add(TTI);
+ PerFunctionPasses->add(
+ createNoTTIPass(TM->getScalarTargetTransformInfo(),
+ TM->getVectorTargetTransformInfo()));
}
}
return PerFunctionPasses;
@@ -482,8 +478,8 @@
PM->add(TLI);
// Add TargetTransformInfo.
- PM->add(new TargetTransformInfo(TM->getScalarTargetTransformInfo(),
- TM->getVectorTargetTransformInfo()));
+ PM->add(createNoTTIPass(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.
More information about the cfe-commits
mailing list