[PATCH] D28073: Preserve domtree and loop-simplify for runtime unrolling.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 22 18:41:04 PST 2016


efriedma created this revision.
efriedma added reviewers: mkuper, haicheng, mzolotukhin, chandlerc.
efriedma added a subscriber: llvm-commits.
efriedma set the repository for this revision to rL LLVM.
Herald added a reviewer: tstellarAMD.
Herald added subscribers: nhaehnle, nemanjai, mehdi_amini.

Mostly straightforward changes; we just didn't do the computation before. One sort of interesting change in LoopUnroll.cpp: we weren't handling dominance for children of the loop latch correctly, but foldBlockIntoPredecessor hid the problem for complete unrolling.

Currently punting on loop peeling; made some minor changes to isolate that problem to LoopUnrollPeel.cpp.

Adds a flag -unroll-verify-domtree to get some regression test coverage for the domtree-related changes.


Repository:
  rL LLVM

https://reviews.llvm.org/D28073

Files:
  include/llvm/Transforms/Utils/UnrollLoop.h
  lib/Transforms/Utils/LoopUnroll.cpp
  lib/Transforms/Utils/LoopUnrollPeel.cpp
  lib/Transforms/Utils/LoopUnrollRuntime.cpp
  test/Transforms/LoopUnroll/2004-05-13-DontUnrollTooMuch.ll
  test/Transforms/LoopUnroll/2005-03-06-BadLoopInfoUpdate.ll
  test/Transforms/LoopUnroll/2006-08-24-MultiBlockLoop.ll
  test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll
  test/Transforms/LoopUnroll/2007-05-05-UnrollMiscomp.ll
  test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll
  test/Transforms/LoopUnroll/2007-11-05-Crash.ll
  test/Transforms/LoopUnroll/2011-08-08-PhiUpdate.ll
  test/Transforms/LoopUnroll/2011-08-09-IVSimplify.ll
  test/Transforms/LoopUnroll/2011-08-09-PhiUpdate.ll
  test/Transforms/LoopUnroll/2011-10-01-NoopTrunc.ll
  test/Transforms/LoopUnroll/2012-04-09-unroll-indirectbr.ll
  test/Transforms/LoopUnroll/AArch64/full-unroll-trip-count-upper-bound.ll
  test/Transforms/LoopUnroll/AArch64/partial.ll
  test/Transforms/LoopUnroll/AArch64/runtime-loop.ll
  test/Transforms/LoopUnroll/AMDGPU/unroll-barrier.ll
  test/Transforms/LoopUnroll/PowerPC/a2-high-cost-trip-count-computation.ll
  test/Transforms/LoopUnroll/PowerPC/a2-unrolling.ll
  test/Transforms/LoopUnroll/PowerPC/p7-unrolling.ll
  test/Transforms/LoopUnroll/X86/mmx.ll
  test/Transforms/LoopUnroll/X86/partial.ll
  test/Transforms/LoopUnroll/basic.ll
  test/Transforms/LoopUnroll/convergent.ll
  test/Transforms/LoopUnroll/ephemeral.ll
  test/Transforms/LoopUnroll/full-unroll-bad-cost.ll
  test/Transforms/LoopUnroll/full-unroll-crashers.ll
  test/Transforms/LoopUnroll/full-unroll-heuristics-2.ll
  test/Transforms/LoopUnroll/full-unroll-heuristics-cmp.ll
  test/Transforms/LoopUnroll/full-unroll-heuristics-dce.ll
  test/Transforms/LoopUnroll/full-unroll-heuristics-geps.ll
  test/Transforms/LoopUnroll/full-unroll-heuristics-phi-prop.ll
  test/Transforms/LoopUnroll/full-unroll-heuristics.ll
  test/Transforms/LoopUnroll/full-unroll-keep-first-exit.ll
  test/Transforms/LoopUnroll/high-cost-trip-count-computation.ll
  test/Transforms/LoopUnroll/ignore-annotation-intrinsic-cost.ll
  test/Transforms/LoopUnroll/loop-remarks-with-hotness.ll
  test/Transforms/LoopUnroll/loop-remarks.ll
  test/Transforms/LoopUnroll/partial-unroll-const-bounds.ll
  test/Transforms/LoopUnroll/peel-loop-pgo.ll
  test/Transforms/LoopUnroll/peel-loop.ll
  test/Transforms/LoopUnroll/pr10813.ll
  test/Transforms/LoopUnroll/pr11361.ll
  test/Transforms/LoopUnroll/pr14167.ll
  test/Transforms/LoopUnroll/pr18861.ll
  test/Transforms/LoopUnroll/pr27157.ll
  test/Transforms/LoopUnroll/pr28132.ll
  test/Transforms/LoopUnroll/rebuild_lcssa.ll
  test/Transforms/LoopUnroll/runtime-loop.ll
  test/Transforms/LoopUnroll/runtime-loop1.ll
  test/Transforms/LoopUnroll/runtime-loop2.ll
  test/Transforms/LoopUnroll/runtime-loop3.ll
  test/Transforms/LoopUnroll/runtime-loop5.ll
  test/Transforms/LoopUnroll/scevunroll.ll
  test/Transforms/LoopUnroll/shifted-tripcount.ll
  test/Transforms/LoopUnroll/tripcount-overflow.ll
  test/Transforms/LoopUnroll/unloop.ll
  test/Transforms/LoopUnroll/unroll-cleanuppad.ll
  test/Transforms/LoopUnroll/unroll-count.ll
  test/Transforms/LoopUnroll/unroll-heuristics-pgo.ll
  test/Transforms/LoopUnroll/unroll-opt-attribute.ll
  test/Transforms/LoopUnroll/unroll-pragmas-disabled.ll
  test/Transforms/LoopUnroll/unroll-pragmas.ll
  test/Transforms/LoopUnroll/update-loop-info-in-subloops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28073.82393.patch
Type: text/x-patch
Size: 51849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161223/49721bb8/attachment-0001.bin>


More information about the llvm-commits mailing list