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

Artem Belevich via llvm-dev
Wed, 02 Mar 2016 00:31:06 -0000

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>