[PATCH] D41463: [CodeGen] Add a new pass to sink Copy instructions after RA

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 12:16:42 PST 2018


sfertile added a comment.



In https://reviews.llvm.org/D41463#980597, @junbuml wrote:

> > I've tested this out on Power with spec2006 and several open-source applications. With spec I saw a pretty similar increase in shrink wrapping opportunities (~11% with -O3 pgo+thinlto, ~7% with just -O3). I've noticed in some instances we do a lot of sinking without enabling new shrink-wrap opportunities though. For example with xalan stats showed we sunk about 4000 copies with this pass, but only enabled 5 new shrink-wrap opportunities and I see a consistent ~2% degradation with ref data. My understanding was enabling more shrink-wrap candidates was the original motivation. Have you considered breaking this up into an analysis that collects what copies are sinkable, and then only sink if doing so is likely to make the block viable for shrink-wrapping?
>
> Very initially, this was motivated for more shrink wrapping, but we don't have to limit this just for more shrink wrapping because it can reduce #of dynamic instruction by sinking copies into paths where their results are really needed. This also helps for  more dead copy eliminations.   Can you please share little bit more detail about Xalan. AFAIK, Xalan score often vary across the top of truck in range of 3~4%.


Sure, I used `-O3 -fexperimental-new-pass-manager` as the compiler options, the only difference between the compilers was this patch and I ran the binaries 7 times. With each executable run-to-run variation was small.


https://reviews.llvm.org/D41463





More information about the llvm-commits mailing list