[PATCH] D23114: [PM] Introduce a devirtualization iteration layer for the new PM.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 03:57:10 PDT 2016


chandlerc created this revision.
chandlerc added a subscriber: llvm-commits.
chandlerc added a dependency: D21462: [PM] Make the the new pass manageg support fully generic extra arguments to run methods, both for transform passes and analysis passes..
Herald added subscribers: mcrosier, mehdi_amini.

This is an orthogonal and separated layer instead of being embedded
inside the pass manager. While it adds a small amount of complexity, it
is fairly minimal and the composability and control seems worth the
cost.

The logic for this ends up being nicely isolated and targeted. It should
be easy to experiment with different iteration strategies wrapped around
the CGSCC bottom-up walk using this kind of facility.

The mechanism used to track devirtualization is the simplest one I came
up with. I think it handles most of the cases the existing iteration
machinery handles, but I haven't done a *very* in depth analysis. It
does however match the basic intended semantics, and we can tweak or
tune its exact behavior incrementally as necessary. One thing that we
may want to revisit is freshly building the value handle set on each
iteration. While I don't think this will be a significant cost (it is
strictly fewer value handles but more churn of value handes than the old
call graph), it is conceivable that we'll want a somewhat more clever
tracking mechanism. My hope is to layer that on as a follow up patch
with data supporting any implementation complexity it adds.

Note, I haven't written a lot of tests for this yet, but it already fixes the
FIXME in the existing test that motivates it. I'll write more detailed tests
for it, but wanted to go ahead and post the core idea behind this.

Depends on D21462

https://reviews.llvm.org/D23114

Files:
  include/llvm/Analysis/CGSCCPassManager.h
  lib/Passes/PassBuilder.cpp
  test/Other/cgscc-observe-devirt.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23114.66639.patch
Type: text/x-patch
Size: 10074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160803/857b5531/attachment.bin>


More information about the llvm-commits mailing list