[llvm] r364937 - Provide basic Full LTO extension points
Serge Guelton via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 08:52:39 PDT 2019
Author: serge_sans_paille
Date: Tue Jul 2 08:52:39 2019
New Revision: 364937
URL: http://llvm.org/viewvc/llvm-project?rev=364937&view=rev
Log:
Provide basic Full LTO extension points
Differential Revision: https://reviews.llvm.org/D61738
Modified:
llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h
llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
Modified: llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h?rev=364937&r1=364936&r2=364937&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/PassManagerBuilder.h Tue Jul 2 08:52:39 2019
@@ -112,6 +112,16 @@ public:
/// passes at the end of the main CallGraphSCC passes and before any
/// function simplification passes run by CGPassManager.
EP_CGSCCOptimizerLate,
+
+ /// EP_FullLinkTimeOptimizationEarly - This extensions point allow adding
+ /// passes that
+ /// run at Link Time, before Full Link Time Optimization.
+ EP_FullLinkTimeOptimizationEarly,
+
+ /// EP_FullLinkTimeOptimizationLast - This extensions point allow adding
+ /// passes that
+ /// run at Link Time, after Full Link Time Optimization.
+ EP_FullLinkTimeOptimizationLast,
};
/// The Optimization Level - Specify the basic optimization level.
Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=364937&r1=364936&r2=364937&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Tue Jul 2 08:52:39 2019
@@ -1016,6 +1016,8 @@ void PassManagerBuilder::populateLTOPass
if (VerifyInput)
PM.add(createVerifierPass());
+ addExtensionsToPM(EP_FullLinkTimeOptimizationEarly, PM);
+
if (OptLevel != 0)
addLTOOptimizationPasses(PM);
else {
@@ -1037,6 +1039,8 @@ void PassManagerBuilder::populateLTOPass
if (OptLevel != 0)
addLateLTOOptimizationPasses(PM);
+ addExtensionsToPM(EP_FullLinkTimeOptimizationLast, PM);
+
if (VerifyOutput)
PM.add(createVerifierPass());
}
More information about the llvm-commits
mailing list