[PATCH] D18561: [NVPTX] Set NVPTXTTI::getInliningThresholdMultiplier to 5.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 00:10:27 PDT 2016


chandlerc requested changes to this revision.
chandlerc added a comment.
This revision now requires changes to proceed.

I ended up chatting with Hal about this and he made a really great point about this. I had been thinking that it is really brittle to have the target provided inlining threshold be an absolute number instead of a multiplier / ratio as you have it.

However, Hal pointed out that this creates a coupling that could also be problematic. Consider an out-of-tree target with a carefully tuned inlining threshold multiplier. If lots of targets do this, changing the threshold could become extremely problematic because small changes would would still disturb the target-specific tunings. His suggestion was to use an absolute threshold from the target in the absense of an explicitly specified command line flag.

Thinking about this more, I think it still presents the same problem. Consider a change to the inliner that significantly changes the rate at which we inline things. It might be useful to be able to adjust the threshold when making the change to keep most inlining decisions neutral across targets.

I'm not 100% sure which is the best mechanism here. Or this may point out a problem with any of these mechanisms.

One possible alternative is to not have the size-based inlining be target configurable, and to make this exclusively handled by the proposed runtime cost estimation based inlining when that goes in...


http://reviews.llvm.org/D18561





More information about the llvm-commits mailing list