[PATCH] D46600: [MergedLoadStoreMotion] Fix a debug invariant bug in mergeStores

Gerolf Hoflehner via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 13:48:15 PDT 2018


The test case could possibly be shorter, but the change LGTM.

Thanks
Gerolf

> On May 8, 2018, at 1:46 PM, Bjorn Pettersson via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> bjope created this revision.
> bjope added reviewers: Gerolf, davide, majnemer.
> Herald added subscribers: JDevlieghere, aprantl.
> 
> MergedLoadStoreMotion::mergeStores is using some heuristics
> to limit the amount of stores that it tries to sink (see
> MagicCompileTimeControl in MergedLoadStoreMotion.cpp). The
> heuristic involves counting the number of instructions in
> one of the basic blocks that is part of the transformation.
> 
> We now ignore dbg intrinsics when counting instruction for
> the MagicCompileTimeControl heuristic. This to make sure that
> the amount of stores that are sunk doesn't depend on the amount
> of debug information (if -g is used or not).
> 
> 
> Repository:
>  rL LLVM
> 
> https://reviews.llvm.org/D46600
> 
> Files:
>  lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
>  test/Transforms/InstMerge/st_sink_debuginvariant.ll
> 
> <D46600.145772.patch>



More information about the llvm-commits mailing list