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

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 20:41:29 PDT 2018


xbolva00 added a comment.

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 :)

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)


https://reviews.llvm.org/D47237





More information about the llvm-commits mailing list