summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-06-26 20:51:17 +0000
committerPhilip Reames <listmail@philipreames.com>2015-06-26 20:51:17 +0000
commit9b5c9580e3847862e67185910d0659ab5ce98be7 (patch)
tree0f6ee9371051841ef27a3e3c56be1154415bdaae /llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
parentc83ac464e68825d16de2b0768506c5f85c284bab (diff)
downloadbcm5719-llvm-9b5c9580e3847862e67185910d0659ab5ce98be7.tar.gz
bcm5719-llvm-9b5c9580e3847862e67185910d0659ab5ce98be7.zip
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
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud