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

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 13:46:29 PDT 2018


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46600.145772.patch
Type: text/x-patch
Size: 12062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180508/ea26d476/attachment.bin>


More information about the llvm-commits mailing list