r227732 - [multiversion] Update Clang for the API change in LLVM r227731.
Chandler Carruth
chandlerc at gmail.com
Sun Feb 1 04:26:23 PST 2015
Author: chandlerc
Date: Sun Feb 1 06:26:23 2015
New Revision: 227732
URL: http://llvm.org/viewvc/llvm-project?rev=227732&view=rev
Log:
[multiversion] Update Clang for the API change in LLVM r227731.
This moves all of the PassManager <-> Target communication to use the
new pass manager's TargetIRAnalysis even with the old pass manager. See
the LLVM commit for some of why things are moving in this direction, but
the short version is that this will enable us to create per-function
TargetTransformInfo objects that have correct subtarget information for
that function.
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=227732&r1=227731&r2=227732&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Sun Feb 1 06:26:23 2015
@@ -61,18 +61,19 @@ class EmitAssemblyHelper {
mutable FunctionPassManager *PerFunctionPasses;
private:
- TargetTransformInfo getTTI() const {
+ TargetIRAnalysis getTargetIRAnalysis() const {
if (TM)
- return TM->getTTI();
+ return TM->getTargetIRAnalysis();
- return TargetTransformInfo(TheModule->getDataLayout());
+ return TargetIRAnalysis();
}
PassManager *getCodeGenPasses() const {
if (!CodeGenPasses) {
CodeGenPasses = new PassManager();
CodeGenPasses->add(new DataLayoutPass());
- CodeGenPasses->add(createTargetTransformInfoWrapperPass(getTTI()));
+ CodeGenPasses->add(
+ createTargetTransformInfoWrapperPass(getTargetIRAnalysis()));
}
return CodeGenPasses;
}
@@ -81,7 +82,8 @@ private:
if (!PerModulePasses) {
PerModulePasses = new PassManager();
PerModulePasses->add(new DataLayoutPass());
- PerModulePasses->add(createTargetTransformInfoWrapperPass(getTTI()));
+ PerModulePasses->add(
+ createTargetTransformInfoWrapperPass(getTargetIRAnalysis()));
}
return PerModulePasses;
}
@@ -90,7 +92,8 @@ private:
if (!PerFunctionPasses) {
PerFunctionPasses = new FunctionPassManager(TheModule);
PerFunctionPasses->add(new DataLayoutPass());
- PerFunctionPasses->add(createTargetTransformInfoWrapperPass(getTTI()));
+ PerFunctionPasses->add(
+ createTargetTransformInfoWrapperPass(getTargetIRAnalysis()));
}
return PerFunctionPasses;
}
More information about the cfe-commits
mailing list