2008-09-22 09:08:49 +08:00
|
|
|
add_llvm_library(LLVMTransformUtils
|
2013-12-06 17:00:17 +08:00
|
|
|
ASanStackFrameLayout.cpp
|
2014-11-08 08:00:47 +08:00
|
|
|
AddDiscriminators.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
BasicBlockUtils.cpp
|
|
|
|
BreakCriticalEdges.cpp
|
2010-03-06 06:34:16 +08:00
|
|
|
BuildLibCalls.cpp
|
2012-09-05 02:22:17 +08:00
|
|
|
BypassSlowDivision.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
CloneFunction.cpp
|
|
|
|
CloneModule.cpp
|
2011-12-17 09:20:32 +08:00
|
|
|
CmpInstAnalysis.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
CodeExtractor.cpp
|
2014-11-08 08:00:47 +08:00
|
|
|
CtorUtils.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
DemoteRegToStack.cpp
|
2016-02-03 10:51:00 +08:00
|
|
|
Evaluator.cpp
|
2014-11-08 08:00:47 +08:00
|
|
|
FlattenCFG.cpp
|
2016-02-11 02:11:31 +08:00
|
|
|
FunctionImportUtils.cpp
|
2013-10-22 01:14:55 +08:00
|
|
|
GlobalStatus.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
InlineFunction.cpp
|
Added ThinLTO inlining statistics
Summary:
copypasta doc of ImportedFunctionsInliningStatistics class
\brief Calculate and dump ThinLTO specific inliner stats.
The main statistics are:
(1) Number of inlined imported functions,
(2) Number of imported functions inlined into importing module (indirect),
(3) Number of non imported functions inlined into importing module
(indirect).
The difference between first and the second is that first stat counts
all performed inlines on imported functions, but the second one only the
functions that have been eventually inlined to a function in the importing
module (by a chain of inlines). Because llvm uses bottom-up inliner, it is
possible to e.g. import function `A`, `B` and then inline `B` to `A`,
and after this `A` might be too big to be inlined into some other function
that calls it. It calculates this statistic by building graph, where
the nodes are functions, and edges are performed inlines and then by marking
the edges starting from not imported function.
If `Verbose` is set to true, then it also dumps statistics
per each inlined function, sorted by the greatest inlines count like
- number of performed inlines
- number of performed inlines to importing module
Reviewers: eraman, tejohnson, mehdi_amini
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D22491
llvm-svn: 277089
2016-07-29 08:27:16 +08:00
|
|
|
ImportedFunctionsInliningStatistics.cpp
|
2009-07-22 01:43:20 +08:00
|
|
|
InstructionNamer.cpp
|
2012-09-19 06:02:40 +08:00
|
|
|
IntegerDivision.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
LCSSA.cpp
|
Conditionally eliminate library calls where the result value is not used
Summary:
This pass shrink-wraps a condition to some library calls where the call
result is not used. For example:
sqrt(val);
is transformed to
if (val < 0)
sqrt(val);
Even if the result of library call is not being used, the compiler cannot
safely delete the call because the function can set errno on error
conditions.
Note in many functions, the error condition solely depends on the incoming
parameter. In this optimization, we can generate the condition can lead to
the errno to shrink-wrap the call. Since the chances of hitting the error
condition is low, the runtime call is effectively eliminated.
These partially dead calls are usually results of C++ abstraction penalty
exposed by inlining. This optimization hits 108 times in 19 C/C++ programs
in SPEC2006.
Reviewers: hfinkel, mehdi_amini, davidxl
Subscribers: modocache, mgorny, mehdi_amini, xur, llvm-commits, beanz
Differential Revision: https://reviews.llvm.org/D24414
llvm-svn: 284542
2016-10-19 05:36:27 +08:00
|
|
|
LibCallsShrinkWrap.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
Local.cpp
|
|
|
|
LoopSimplify.cpp
|
2009-11-03 12:01:53 +08:00
|
|
|
LoopUnroll.cpp
|
2011-12-09 14:19:40 +08:00
|
|
|
LoopUnrollRuntime.cpp
|
2015-04-20 12:38:33 +08:00
|
|
|
LoopUtils.cpp
|
2015-07-11 02:55:13 +08:00
|
|
|
LoopVersioning.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
LowerInvoke.cpp
|
|
|
|
LowerSwitch.cpp
|
|
|
|
Mem2Reg.cpp
|
2016-02-03 06:46:49 +08:00
|
|
|
MemorySSA.cpp
|
2012-09-11 10:55:37 +08:00
|
|
|
MetaRenamer.cpp
|
2011-11-01 07:58:51 +08:00
|
|
|
ModuleUtils.cpp
|
2016-09-17 00:56:30 +08:00
|
|
|
NameAnonGlobals.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
PromoteMemoryToRegister.cpp
|
2016-10-22 02:43:16 +08:00
|
|
|
StripGCRelocates.cpp
|
2009-10-10 17:04:27 +08:00
|
|
|
SSAUpdater.cpp
|
2016-01-16 08:31:11 +08:00
|
|
|
SanitizerStats.cpp
|
2009-07-22 01:43:20 +08:00
|
|
|
SimplifyCFG.cpp
|
2011-08-10 11:51:58 +08:00
|
|
|
SimplifyIndVar.cpp
|
2010-12-21 04:54:37 +08:00
|
|
|
SimplifyInstructions.cpp
|
2012-10-14 00:45:24 +08:00
|
|
|
SimplifyLibCalls.cpp
|
2015-08-21 10:48:20 +08:00
|
|
|
SplitModule.cpp
|
2014-11-08 08:00:47 +08:00
|
|
|
SymbolRewriter.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
UnifyFunctionExitNodes.cpp
|
2010-10-08 01:55:47 +08:00
|
|
|
Utils.cpp
|
2008-09-22 09:08:49 +08:00
|
|
|
ValueMapper.cpp
|
2015-02-11 11:28:02 +08:00
|
|
|
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms
|
|
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms/Utils
|
2008-09-22 09:08:49 +08:00
|
|
|
)
|
2012-06-24 21:32:01 +08:00
|
|
|
|
|
|
|
add_dependencies(LLVMTransformUtils intrinsics_gen)
|