[llvm-dev] [RFC] Target-specific parametrization of function inliner

Artem Belevich via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 1 16:31:06 PST 2016


Hi,

I propose to make function inliner parameters adjustable for specific
target.

Currently function inlining pass appears to be target-agnostic with various
constants for calculating call cost hardcoded. While it works reasonably
well for general purpose CPUs, some quirkier targets like NVPTX would
benefit from target-specific tuning.

Currently it appears that there are two things that need to be done:

* add Inliner preferences to TargetTransformInfo in a way similar to how we
customize loop unrolling. Use it to provide inliner with target-specific
thresholds and other parameters.
* augment Inliner pass to use existing TargetTransformInfo API to figure
out cost of particular call on a given target. TargetTransforInfo already
has getCallCost(), though it does not look like anything uses it.

Comments? Concerns? Suggestions?

Thanks,
-- 
--Artem Belevich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160301/e371ce52/attachment.html>


More information about the llvm-dev mailing list