[PATCH] D29426: [PM] WIP: Port ArgumentPromotion to the new pass manager.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 14:25:08 PST 2017


chandlerc created this revision.
Herald added subscribers: mcrosier, mehdi_amini.

This is a fresh attempt to port ArgumentPromotion to the new pass manager. The
key difference is that we now handle the deletion of reference edges when
promoting calls. This requires re-scanning the callers to compute the set of
*removed* references which turns this whole thing quadratic.

I'm not sure we want to go this route long term, and not even sure if this will
be an acceptable short-term direction, but sending out the work in progress to
aid discussions and experiments with others.

Note that this will crash if we end up deleting an edge in a way that
decomposes a RefSCC into multiple new RefSCCs. Code for that hasn't been added.


https://reviews.llvm.org/D29426

Files:
  include/llvm/Analysis/LazyCallGraph.h
  include/llvm/Transforms/IPO/ArgumentPromotion.h
  lib/Analysis/CGSCCPassManager.cpp
  lib/Analysis/LazyCallGraph.cpp
  lib/Passes/PassBuilder.cpp
  lib/Passes/PassRegistry.def
  lib/Transforms/IPO/ArgumentPromotion.cpp
  test/Transforms/ArgumentPromotion/aggregate-promote.ll
  test/Transforms/ArgumentPromotion/attrs.ll
  test/Transforms/ArgumentPromotion/byval-2.ll
  test/Transforms/ArgumentPromotion/byval.ll
  test/Transforms/ArgumentPromotion/callgraph-update.ll
  test/Transforms/ArgumentPromotion/chained.ll
  test/Transforms/ArgumentPromotion/control-flow.ll
  test/Transforms/ArgumentPromotion/control-flow2.ll
  test/Transforms/ArgumentPromotion/crash.ll
  test/Transforms/ArgumentPromotion/dbg.ll
  test/Transforms/ArgumentPromotion/fp80.ll
  test/Transforms/ArgumentPromotion/inalloca.ll
  test/Transforms/ArgumentPromotion/pr27568.ll
  test/Transforms/ArgumentPromotion/reserve-tbaa.ll
  test/Transforms/ArgumentPromotion/sret.ll
  test/Transforms/ArgumentPromotion/tail.ll
  test/Transforms/ArgumentPromotion/variadic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29426.86720.patch
Type: text/x-patch
Size: 21930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170201/e746f5e9/attachment.bin>


More information about the llvm-commits mailing list