[PATCH] D109280: [WIP][DSE] Memory intrinsics like memset, memcpy, memmove are removed if they are overwritten by a store in a loop
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 5 09:05:35 PDT 2021
xbolva00 added a subscriber: nikic.
xbolva00 added a comment.
In D109280#3043121 <https://reviews.llvm.org/D109280#3043121>, @vdsered wrote:
> Hi, @xbolva00. Are you sure that we can use loop idiom and transform arbitrary loop with a store into let's a memset?
>
> Regardning memset, it accepts i8 type as a value. I know how it can transform a loop with stores like store i32 0, i32* %9 <https://godbolt.org/z/MzYbqTE73> or e.g. store i32 286331153, i32* %9 <https://godbolt.org/z/hvEon8rqE>, but it'd fail on an example where we'd write store i32 1, i32* %9 <https://godbolt.org/z/6WPx7P5a4>
Ah, right.
I think this would have nontrivial impact on compile time (@nikic ?) and the results from testsuite do not look so promising - I would expect more “hits” to justify (small if possible) compile time regression.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109280/new/
https://reviews.llvm.org/D109280
More information about the llvm-commits
mailing list