[PATCH] D87551: [LICM] Make Loop ICM profile aware again

Di Mo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 15:33:47 PDT 2020


modimo created this revision.
modimo added reviewers: wenlei, vsk, asbirlea, nikic, davidxl.
Herald added subscribers: llvm-commits, lxfind, hiraditya.
Herald added a project: LLVM.
modimo requested review of this revision.
Herald added a subscriber: ormris.

D65060 <https://reviews.llvm.org/D65060> was reverted because it introduced non-determinism by using BFI counts from already freed blocks. The parent of this revision fixes that by using a VH callback on blocks to prevent this from happening and makes sure BFI data is passed correctly in LoopStandardAnalysisResults.

This re-introduces the previous optimization of using BFI data to prevent LICM from hoisting/sinking if the instruction will end up moving to a colder block.

Testing:
ninja check


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87551

Files:
  llvm/include/llvm/Transforms/Utils/LoopUtils.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Transforms/Scalar/LICM.cpp
  llvm/test/Transforms/LICM/Inputs/no-hoist-prof.prof
  llvm/test/Transforms/LICM/no-hoist-prof.ll
  llvm/test/Transforms/LICM/sink.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87551.291347.patch
Type: text/x-patch
Size: 17693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200911/35d95c0f/attachment.bin>


More information about the llvm-commits mailing list