[PATCH] D47237: [DSE] Calloc-strlen optimizations

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 24 16:49:55 PDT 2018


vsk added a comment.

In https://reviews.llvm.org/D47237#1109013, @xbolva00 wrote:

> In https://reviews.llvm.org/D47237#1109008, @vsk wrote:
>
> > Is this a common pattern, or are there real-world benchmarks this improves?
> >
> > This adds a fair bit of code to a hot part of the compiler, so it'd be worth sharing LNT and CTMark data to make sure there aren't any regressions (http://llvm.org/docs/lnt/quickstart.html, https://github.com/llvm-mirror/test-suite/tree/master/CTMark).
>
>
> I will try to run that benchmarks, but I see no reasons for regressions, but I will check it :)


Thanks. For patches which touch hot and/or performance-sensitive parts of the compiler, it's standard practice to provide benchmark results. This is a basic way to communicate improvements and to catch regressions (both performance & compile-time).

> This patch also introduces "base" in DSE for more future transformations like:
>  memset(s, 0, len)
>  strlen(s) --> 0
> 
> And also in the future we can finally do proper malloc+memset folding to calloc (currently there is suboptimal code for it in InstCombine)
> 
> Edit: data from CTMark: https://www.diffchecker.com/Zs5boksn

Could you aggregate this data over multiple runs, and report some statistics so we can compare the baseline versus the patched compiler at a high-level? The same goes for LNT. It would be useful to see if/how the geomean execution time & compile time change. For individual benchmarks, it's standard practice to share which benchmarks improve the most (& by how much), and which benchmarks regress.


https://reviews.llvm.org/D47237





More information about the llvm-commits mailing list