[PATCH] D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 16:24:49 PDT 2017


hiraditya updated this revision to Diff 110647.
hiraditya added a comment.

Based on suggestions from @dberlin, I have updated the patch:

1. Compute iterated post-dominance frontiers
2. Iterate on post-dominator tree to insert CHIargs more efficiently

The time complexity would now be: O(duplicate-values * N) where N = nodes in the CFG. For each duplicate values the algorithm finds their control-dependence by computing the iterated post-dominance frontier and then inserts CHI args to track anticipability.


https://reviews.llvm.org/D35918

Files:
  lib/Transforms/Scalar/GVNHoist.cpp
  test/Transforms/GVNHoist/hoist-more-than-two-branches.ll
  test/Transforms/GVNHoist/hoist-mssa.ll
  test/Transforms/GVNHoist/hoist-newgvn.ll
  test/Transforms/GVNHoist/hoist-pr20242.ll
  test/Transforms/GVNHoist/hoist-pr28933.ll
  test/Transforms/GVNHoist/hoist-recursive-geps.ll
  test/Transforms/GVNHoist/hoist.ll
  test/Transforms/GVNHoist/infinite-loop-direct.ll
  test/Transforms/GVNHoist/infinite-loop-indirect.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35918.110647.patch
Type: text/x-patch
Size: 50890 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170810/f99ef4bf/attachment.bin>


More information about the llvm-commits mailing list