[PATCH] D28676: Makes incremental dominator calculation in Loop Unroll pass

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 06:07:50 PST 2017


sepavloff created this revision.
sepavloff added reviewers: mzolotukhin, atrick, mkuper.
sepavloff added subscribers: llvm-commits, davide.

Loop unroller contains code that tries to update dominator tree on fly,
but eventually it calculates the tree from scratch for entire function.
If there are many loops in the function the compilation may be slow down.
Also inconsistent dominator info prevents from loop verification during
transformations.

This change implements incremental dominator tree update.

Part of this change (files Debug.h, LoopInfo.cpp and Dominators.cpp) is
independent from the rest of the patch, it implements changes required
to make testing of the dominator calculation.

Verifications of dominator tree and loop info are expensive operations
so they are disabled by default. They can be enabled by command line
options -verify-dom-info and -verify-loop-info. These options however
enable checks only in files Dominators.cpp and LoopInfo.cpp. If some
transformation changes dominaror tree and/or loop info, it would be
convenient to place similar checks to the files implementing the
transformation. By making corresponding flags global the verification
can be turned on optionally, even if expensive checks were not enabled
during build.


https://reviews.llvm.org/D28676

Files:
  include/llvm/Support/Debug.h
  lib/Analysis/LoopInfo.cpp
  lib/IR/Dominators.cpp
  lib/Transforms/Utils/LoopUnroll.cpp
  lib/Transforms/Utils/LoopUnrollPeel.cpp
  lib/Transforms/Utils/LoopUnrollRuntime.cpp
  test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll
  test/Transforms/LoopUnroll/peel-loop.ll
  test/Transforms/LoopUnroll/runtime-loop.ll
  test/Transforms/LoopUnroll/runtime-loop3.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28676.84291.patch
Type: text/x-patch
Size: 13442 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170113/99f67f23/attachment.bin>


More information about the llvm-commits mailing list