[PATCH] D96754: [NewPM] Use stale divergence analysis with SimpleLoopUnswitch
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 12:13:03 PST 2021
asbirlea requested changes to this revision.
asbirlea added a comment.
This revision now requires changes to proceed.
This is absolutely **not** the right way resolve this.
First, the restriction to not allow getting a stale analysis is very much intentional and part of the design of the new pass manager. The API being added here must not exist.
Second, it is not safe to use the stale DA. LoopUnswitch gets the LegacyDivergenceAnalysis only when making the final unswitching decision, and it does not reuse a stale instance. The same needs to happen in SimpleLoopUnswitch.
A proper solution is to change the divergence analysis pass so it can be created as an object. An example of a pass used as an object is the OptimizationRemarkEmitter.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96754/new/
https://reviews.llvm.org/D96754
More information about the llvm-commits
mailing list