[PATCH] D29277: [PM] Port ArgumentPromotion to the new pass manager.
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 04:30:11 PST 2017
chandlerc created this revision.
Herald added a subscriber: mcrosier.
This requires teaching the LazyCallGraph how to replace functions in the
graph in-place, but otherwise is a fairly direct port of the existing
logic.
The one interesting thing is that LCG can handle much more directly
making this update which allows us to just skip the hooks in the core
argument promotion logic used by the old PM. This is largely a function
of not tracking call instructions and instead tracking the actual edges
in the graph at an abstract level.
Note that this isn't quite ready to submit yet. It exposes a crash in the
inliner that I'm still investigating. But the code seems reasonable enough and
I have both unittesting for the LCG change and direct testing of argpromote.
https://reviews.llvm.org/D29277
Files:
include/llvm/Analysis/LazyCallGraph.h
include/llvm/Transforms/IPO/ArgumentPromotion.h
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
unittests/Analysis/LazyCallGraphTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29277.86267.patch
Type: text/x-patch
Size: 28050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170130/2055067f/attachment.bin>
More information about the llvm-commits
mailing list