[PATCH] D86156: [BFI] Preserve BFI information through loop passes via VH callbacks inside LoopStandardAnalysisResults

Wenlei He via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 22 23:17:32 PDT 2020


wenlei added a comment.

> If only LICM benefits from it, I'd consider creating a BFI instance for the duration of the LICM pass

Currently only LICM uses BFI, but I think it'd be beneficial for other loop passes to be able to use BFI too. BFI not accessible to loop passes seems to be a non-trivial limitation (comparing to other compilers). I would think it's not that other loop passes won't benefit from BFI, but because of the constraints imposed by pass manager, we couldn't reap any potential benefit.

I'm hoping that we could find a way to lift that limitation (and of course without breaking the invariants we need to keep for pass manager). This change is an attempt towards that. It's not ideal, as it only covers invalidation (for removal of blocks), but not incremental update for BFI to reflect arbitrary CFG changes, which can be really hard. Still, we think it's a practical solution to expose BFI to loop passes.

> or only enabling it in loop pipelines that have LICM in them (see example comment in one of the tests).

Makes sense for now.


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

https://reviews.llvm.org/D86156



More information about the cfe-commits mailing list