[PATCH] D50305: [WIP!][SimplifyCFG] Preserve the DomTree in the SimplifyCFG pass

Chijun Sima via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 5 04:03:06 PDT 2018


NutshellySima created this revision.
NutshellySima added a reviewer: kuhar.
Herald added subscribers: llvm-commits, zzheng.

> Note: This is a work-in-progress patch and I don't intend to commit it. Please ignore it if you are automatically subscribed.

This patch relies on https://reviews.llvm.org/D50302 which provides a utility for complex passes to test whether it is profitable to preserve the DominatorTree.

This patch converts the SimplifyCFG pass into preserving the DominatorTree. Combined with https://reviews.llvm.org/D50303, you can compare the performance difference by looking at the total time used by the whole DominatorTree.

>From my experiment, it is not profit to preserve the DomTree in the SimplifyCFG pass, and we can further look into this issue. (Detect whether it is slow because SimplifyCFG loves to rewire a bunch of edges and make DominatorTree spend to much effort on it).


Repository:
  rL LLVM

https://reviews.llvm.org/D50305

Files:
  include/llvm/Transforms/Utils/Local.h
  lib/Transforms/Scalar/SimplifyCFGPass.cpp
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/Transforms/SimplifyCFG/2002-05-21-PHIElimination.ll
  test/Transforms/SimplifyCFG/2002-09-24-PHIAssertion.ll
  test/Transforms/SimplifyCFG/2003-03-07-DominateProblem.ll
  test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
  test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
  test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
  test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
  test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll
  test/Transforms/SimplifyCFG/2004-12-10-SimplifyCFGCrash.ll
  test/Transforms/SimplifyCFG/2005-06-16-PHICrash.ll
  test/Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll
  test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll
  test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
  test/Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll
  test/Transforms/SimplifyCFG/2006-06-12-InfLoop.ll
  test/Transforms/SimplifyCFG/2006-08-03-Crash.ll
  test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
  test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll
  test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll
  test/Transforms/SimplifyCFG/2007-12-21-Crash.ll
  test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
  test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll
  test/Transforms/SimplifyCFG/2008-07-13-InfLoopMiscompile.ll
  test/Transforms/SimplifyCFG/2008-09-08-MultiplePred.ll
  test/Transforms/SimplifyCFG/DeadSetCC.ll
  test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
  test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50305.159206.patch
Type: text/x-patch
Size: 35610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180805/e6bc9ff3/attachment.bin>


More information about the llvm-commits mailing list