[PATCH] D18798: New code hoisting pass based on GVN

Sebastian Pop via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 10:55:36 PDT 2016


sebpop created this revision.
sebpop added reviewers: dberlin, chandlerc, mcrosier.
sebpop added subscribers: llvm-commits, flyingforyou, hiraditya, joker.eph, bcahoon.
sebpop set the repository for this revision to rL LLVM.

This pass hoists common computations across branches sharing common immediate
dominator. Like early-cse, the primary goal of early-gvn is to reduce the size
of functions before inline heuristics to reduce the total cost of function
inlining. In some cases this pass also reduces the critical path by exposing
more ILP.

The pass addresses the comments from Daniel Berlin from the previous review at http://reviews.llvm.org/D18710:
in particular, the complexity of the pass is now O(N) with N the number of instructions in the blocks where code hoisting is applied.
The pass works on the existing GVN from trunk, and can be ported to Danny's NewGVN by updating the calls to the VN look-ups.

Passes llvm regression test and test-suite.

Pass written by:
Sebastian Pop
Aditya Kumar
Xiaoyu Hu
Brian Rzycki

Repository:
  rL LLVM

http://reviews.llvm.org/D18798

Files:
  llvm/include/llvm/InitializePasses.h
  llvm/include/llvm/LinkAllPasses.h
  llvm/include/llvm/Transforms/Scalar.h
  llvm/include/llvm/Transforms/Scalar/GVN.h
  llvm/lib/Passes/PassRegistry.def
  llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/lib/Transforms/Scalar/Scalar.cpp
  llvm/test/Transforms/GVN/hoist.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18798.52713.patch
Type: text/x-patch
Size: 20740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160405/928e9cea/attachment.bin>


More information about the llvm-commits mailing list