[PATCH] D60783: [LoopPred] Implement a version of the profitability heuristic w/o BPI

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 13:55:07 PDT 2019


hfinkel added a comment.

In D60783#1469776 <https://reviews.llvm.org/D60783#1469776>, @fedor.sergeev wrote:

> In D60783#1469458 <https://reviews.llvm.org/D60783#1469458>, @hfinkel wrote:
>
> > > In the new pass manager, getting access to BPI reliability is a challenge. In practice, we've been running downstream with a variation of this non-BPI based heuristic.
> >
> > Can you please explain why? The new pass manager was supposed to make our problems getting a hold of analysis results in different places easier, not harder.
>
>
> New pass manager provides proper organization of analyses but it cant (and shouldnt!) hide innate asymmetry in relationship between Function-level analysis and Loop-level transformation.
>  NPM specifically prohibits reruns of outer-level analysis from within a inner-level-pass (proxy is readonly).
>  When working on loop-level you can only *use* function/module-level analysis, manually *preserve* it or automatically invalidate analysis results as a whole after the changes to IR.
>  That seems to be a proper design decision.


Indeed.

> For BPI that means we can not rerun BPI as soon as some loop-level pass invalidates it. So the only way to get BPI reliably in all loop passes is to teach all the loop passes to preserve BPI.

Either that, or we need some kind of LoopBPI analysis which can be re-constructed at the loop level. I'd prefer either of these to duplicating the logic elsewhere.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60783





More information about the llvm-commits mailing list