[PATCH] D79036: [SCCP] Switch to widen at PHIs, stores and call edges.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 9 13:49:49 PDT 2020


fhahn updated this revision to Diff 263034.
fhahn marked 4 inline comments as done.
fhahn added a comment.

In D79036#2011139 <https://reviews.llvm.org/D79036#2011139>, @nikic wrote:

> In D79036#2010532 <https://reviews.llvm.org/D79036#2010532>, @fhahn wrote:
>
> > In terms of compile-time, it seems to have a relatively small negative impact (worst is +0.20%) according to http://llvm-compile-time-tracker.com/compare.php?from=209ab6d8835cd88320ceb814893759cfbda91d15&to=6ab3496169adf3115d3476b1cdde30cc4d0614f1&stat=instructions
> >
> > Comparing cycles, it looks mostly positive, with  a few -2%+ improvements in compile-time
>
>
> Pretty sure those cycles are some unlucky noise. From the instruction counts, the impact looks fine. Looking into the per-file breakdown, there is one case that may be worth double checking: `libclamav_upx.c` from the ClamAV benchmark has a 4-5% increase in the ThinLTO configuration (which only runs mid-level optimizer, so SCCP stands out more). Possibly that exposes some pathological case.


I had a look at ClamAV and in the file in question, there are a lot of function calls which take arguments depending on a few phis. That's the scenario with the biggest knock-on effect unfortunately. I play around a bit, but I don't think there's much we can really do about those cases.

I've also updated the code to handle a merging a bit differently, which hopefully makes things a bit better in a few de-generate cases. Numbers: http://llvm-compile-time-tracker.com/compare.php?from=ae920a81ffa3c7e3c14de131d0d55abd31bbff7d&to=c1d4b08c704638cd835728397ec957abd5bd89e9&stat=instructions

What do you think?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79036/new/

https://reviews.llvm.org/D79036

Files:
  llvm/include/llvm/Analysis/ValueLattice.h
  llvm/lib/Transforms/Scalar/SCCP.cpp
  llvm/test/Transforms/SCCP/constant-range-struct.ll
  llvm/test/Transforms/SCCP/ipsccp-cycles.ll
  llvm/test/Transforms/SCCP/resolvedundefsin-tracked-fn.ll
  llvm/test/Transforms/SCCP/widening.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79036.263034.patch
Type: text/x-patch
Size: 20548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200509/7091bf65/attachment.bin>


More information about the llvm-commits mailing list