[PATCH] D28292: [PM] Rewrite the loop pass manager to use a worklist and augmented run arguments much like the CGSCC pass manager.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 06:29:30 PST 2017


chandlerc added a comment.

In https://reviews.llvm.org/D28292#635230, @davide wrote:

> Couple of high-level comments:
>
> 1. What's the price paid (in compile time) for computing the analyses upfront in a function pass and making them available to the loop passes?


Very low. We are already computing all of these in the main loop pipeline today. This just makes it explicit.

Many of these are "almost always cached" analyses as well such as TLI, TTI, etc.

That said, I don't have numbers. It's way too early to even get numbers. We can change the particular set of analyses we do this with later as needed though. I just picked all the analyses that had multiple loop pass users and where those passes seemed like actively developed and used things and the analyses didn't seem weird or overly specialized.

> 2. What's specifically your plan for LCSSA?

The current thinking based on a discussion between myself and Michael Z is to teach the pass manager itself to form loops into LCSSA before starting the inner pipeline (when it is a function pass and can do this) and verify that it is preserved throughout the run. No ambiguity or implicit handshake.

As to the *exact* implementation, I want to play with the code to see what works cleanly before I speculate.


https://reviews.llvm.org/D28292





More information about the llvm-commits mailing list