[PATCH] Add a shrink-wrapping pass to improve the placement of prologue and epilogue.

Daniel Berlin dberlin at dberlin.org
Wed Apr 22 16:24:28 PDT 2015


I was looking at the old version, but ...

https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_26/lib/CodeGen/ShrinkWrapping.cpp

This is essentially the Chow paper, but

1. The dataflow is not really expensive (It's O(N), the same as your
current algorithm). If it is, you should do it differently ;)  It can
be computed  really fast.  Definitely faster than computing
post-dominators.

2. The chow paper handles multiple save/restore points :)


If your concern is #1, that's solvable, easily.
If the concern is "avoiding placement into bad blocks", that's also
solvable.  Chow does not use the other lazy code motion calculations
for some reason.  If it did, it would not place it into loops :)

In fact, it will give you the placement points, and you can choose
which you want, and then it will give you the insertion/deletions to
make that happen.





On Wed, Apr 22, 2015 at 4:12 PM, Quentin Colombet <qcolombet at apple.com> wrote:
> Hi Daniel,
>
>
> REPOSITORY
>   rL LLVM
>
> http://reviews.llvm.org/D9210
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>



More information about the llvm-commits mailing list