[PATCH] D81716: Extend InlineFeatureAnalysis to more extract generic code features

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 07:33:29 PDT 2020


mtrofin added a comment.

In D81716#2091417 <https://reviews.llvm.org/D81716#2091417>, @jdoerfert wrote:

> @mtrofin We want to "rename" `InlineFeatureAnalysis` to a more generic name and extend it. This patch does the former, basically, and adds a printer pass. Extensions will follow soon. Is that generally OK with you?
>
> @tarinduj I left some comments. We also need to replace the old `InlineFeaturesAnalsysis` with the `CodeFeature` one everywhere, assuming @mtrofin doesn't have any concerns. Generally we minimize duplication ;)


Some feature calculations are computationally intensive. At least for inlining, we plan in a next step to look at regions of the call graph around a call site. I wouldn't want to burden other consumers with this extra cost.

As a first step, if the planned new features would add space or computational overhead, could the work requiring the extra features have its own analysis and consume both analysis results? As we have examples of more such analyses and understand the usecases and performance tradeoffs, we can very easily refactor / rename.

If the new features are simple and small, SGTM - the only issue I have is the name, it's too generic - I worry it invites grabbag  dumping of features. Can we find something more specific? What would the short/medium term consumers be (that could help with a name)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81716/new/

https://reviews.llvm.org/D81716





More information about the llvm-commits mailing list