[PATCH] D65060: [LICM] Make Loop ICM profile aware

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 21 10:51:40 PDT 2019


wenlei created this revision.
wenlei added reviewers: asbirlea, sanjoy.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Hoisting/sinking instruction out of a loop isn't always beneficial. Hoisting an instruction from a cold block inside a loop body out of the loop could hurt performance. This change makes Loop ICM profile aware - it now checks block frequency to make sure hoisting/sinking anly moves instruction to colder block.

Test Plan:

ninja check


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65060

Files:
  llvm/include/llvm/Transforms/Utils/LoopUtils.h
  llvm/lib/Transforms/Scalar/LICM.cpp
  llvm/test/Other/opt-O2-pipeline.ll
  llvm/test/Other/opt-O3-pipeline.ll
  llvm/test/Other/opt-Os-pipeline.ll
  llvm/test/Other/pass-pipelines.ll
  llvm/test/Transforms/LICM/sink.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65060.211005.patch
Type: text/x-patch
Size: 21391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190721/259edd7c/attachment-0001.bin>


More information about the llvm-commits mailing list