1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
llvm-mirror/lib/Analysis/IPA
Philip Reames 3680a5e70e Teach InlineCost to account for a null check which can be folded away
If we have a caller that knows a particular argument can never be null, we can exploit this fact while simplifying values in the inline cost analysis. This has the effect of reducing the cost for inlining when a null check is present in the callee, but the value is known non null in the caller. In particular, any dependent control flow can be discounted from the cost estimate.

Note that we use the parameter attributes at the call site to memoize the analysis within the caller's code.  The setting of this attribute is done in InstCombine, the inline cost analysis just consumes it.  This is intentional and important because we want the inline cost analysis results to be easily cachable themselves.  We're not currently doing so, but initial results on LTO indicate this will quickly become important.

Differential Revision: http://reviews.llvm.org/D9129

llvm-svn: 240828
2015-06-26 20:51:17 +00:00
..
CallGraph.cpp [CallGraph] Given -print-callgraph a stable printing order. 2015-06-19 23:20:31 +00:00
CallGraphSCCPass.cpp [CallGraph] Teach the CallGraph about non-leaf intrinsics. 2015-06-18 19:28:26 +00:00
CallPrinter.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CMakeLists.txt Remove the unused FindUsedTypes pass. 2014-11-24 20:53:26 +00:00
GlobalsModRef.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InlineCost.cpp Teach InlineCost to account for a null check which can be folded away 2015-06-26 20:51:17 +00:00
IPA.cpp Remove the unused FindUsedTypes pass. 2014-11-24 20:53:26 +00:00
LLVMBuild.txt
Makefile