<div dir="ltr">Hi,<div><br></div><div>I propose to make function inliner parameters adjustable for specific target. <br></div><div><br></div><div>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. </div><div><br></div><div>Currently it appears that there are two things that need to be done:</div><div><br></div><div>* 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.</div><div>* 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.</div><div><br></div><div>Comments? Concerns? Suggestions?</div><div><br></div><div>Thanks,</div><div>-- <br><div class="gmail_signature"><div dir="ltr">--Artem Belevich</div></div>
</div></div>