[LLVMdev] RFC: Pass Manager Redux

Chris Lattner clattner at apple.com
Sat Jul 21 17:25:19 PDT 2012


On Jul 11, 2012, at 2:50 AM, Chandler Carruth wrote:
> In working on a new optimization pass (splitting cold regions into separate functions based on branch probabilities) I've run into some limitations of the current pass manager infrastructure. After chatting about this with Nick, it seems that there are some pretty systematic weaknesses of the current design and implementation (but not with the fundamental concepts or behavior).

This sounds really great to me, and it is long overdue.

Here are a few additional feature requests to consider since you're revamping this area:

1. Performance: the current pass manager is far slower than it should be.  Try running our current pass pipeline over a module with a ton of empty functions and see how bad it is.

2. It would be great to get conditionally invalidated analysis passes.  For example, if you run something like "dominators, loop unswitch, dominators", and loop unswitch doesn't *actually* change anything, then the second run of dominators shouldn't do anything.  In fact, we shouldn't have two instantiations of the dominator pass in the first place.

3. There are some problems around pass invalidation that make it difficult to implement stateful (i.e., not ImmutablePass) alias analysis algorithms.  Since the patent on steensgaard's analysis is about to expire, it would be nice to be able to implement it and have all the optimizer get better.  I forget the forget the details though.  Dan, do you remember the issues?

-Chris



More information about the llvm-dev mailing list