[PATCH] Review for hoisting and sinking of equivalent memory instruction (Instruction Merge Pass)

Gerolf Hoflehner ghoflehner at apple.com
Tue Jun 10 13:43:29 PDT 2014


Hi chandlerc,

This pass iteratively hoists two loads to the same address out of a diamond (hammock) and merges them
into a single load in the header. Similar it sinks and merges two stores to the tail block. The algorithm
iterates over the instructions of one side of the diamond and attempts to find a matching load/store on
the other side. It hoists / sinks when it thinks it safe to do so.  I tailored the code as conservative as possible to catch the initial cases we are interested in, which keeps code size and complexity in check. The optimization helps hiding load latencies and triggering if-conversion.

http://reviews.llvm.org/D4096

Files:
  bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c
  include/llvm-c/Transforms/Scalar.h
  include/llvm/InitializePasses.h
  include/llvm/LinkAllPasses.h
  include/llvm/Transforms/Scalar.h
  lib/LTO/LTOCodeGenerator.cpp
  lib/Transforms/IPO/PassManagerBuilder.cpp
  lib/Transforms/Scalar/CMakeLists.txt
  lib/Transforms/Scalar/IM.cpp
  lib/Transforms/Scalar/Scalar.cpp
  test/Transforms/InstMerge/ld_hoist_st_sink.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4096.10301.patch
Type: text/x-patch
Size: 25918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140610/3ef7dc89/attachment.bin>


More information about the llvm-commits mailing list