[PATCH] D22778: Add Loop Sink pass to reverse the LICM based of basic block frequency.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 14:05:49 PDT 2016


danielcdh created this revision.
danielcdh added reviewers: hfinkel, davidxl.
danielcdh added a subscriber: llvm-commits.
Herald added subscribers: mzolotukhin, sanjoy.

LICM may hoist instructions to preheader speculatively. Before code generation, we need to sink down the hoisted instructions inside to loop if it's beneficial. This pass is a reverse of LICM: looking at instructions in preheader and sinks the instruction to basic blocks inside the loop body if basic block frequency is smaller than the preheader frequency.

https://reviews.llvm.org/D22778

Files:
  include/llvm/InitializePasses.h
  include/llvm/LinkAllPasses.h
  include/llvm/Transforms/Scalar.h
  lib/Transforms/Scalar/CMakeLists.txt
  lib/Transforms/Scalar/LoopSink.cpp
  lib/Transforms/Scalar/Scalar.cpp
  lib/Transforms/Utils/SimplifyInstructions.cpp
  test/Transforms/LICM/sink.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22778.65418.patch
Type: text/x-patch
Size: 14017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160725/99460e9b/attachment.bin>


More information about the llvm-commits mailing list