[PATCH] D60769: [SimpleLoopUnswitch] Discard stale prof branch_weights for partial unswitched branches

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 04:32:44 PDT 2019


yrouban created this revision.
yrouban added reviewers: reames, asbirlea, mkazantsev, chandlerc.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

In https://reviews.llvm.org/D60606#1464782 Philip Reames pointed out that partial unswitched branches lose their profile information.
This patch fixes SimpleLoopUnswitch pass to make it happen: to not reuse the stale perf branch_weights if any but explicitly discard them for partially unswitched branches.
Couple of tests are fixed to check the changes both for trivial and non-trivial unswitch.


https://reviews.llvm.org/D60769

Files:
  llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
  llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch.ll
  llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60769.195352.patch
Type: text/x-patch
Size: 4953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190416/5cb4ecda/attachment.bin>


More information about the llvm-commits mailing list