[PATCH] D36287: [SimplifyCFG] Simplify based on a dominating condition (looking past hammocks and diamonds).

Chad Rosier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 14:16:30 PDT 2017


mcrosier created this revision.
Herald added a subscriber: javed.absar.

This patch extends the support for simplifying the CFG based on a dominating condition.  The search threshold is increased from 1 to 3.  In turn, a new function is added to IR BasicBlock, getIDom(), that looks past hammocks and diamonds.  I suspect this new function might be useful in other scenarios.

No correctness issues or compile-time regressions above noise for llvmts, SPEC2000, SPEC2006, SPEC2017.  This results in a small code size reduction in some cases and hits about 1/3 of the SPEC benchmarks and a few tests from the llvmts.

Chad


https://reviews.llvm.org/D36287

Files:
  include/llvm/Analysis/ValueTracking.h
  include/llvm/IR/BasicBlock.h
  lib/Analysis/ValueTracking.cpp
  lib/IR/BasicBlock.cpp
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/CodeGen/AArch64/addsub.ll
  test/CodeGen/AArch64/arm64-andCmpBrToTBZ.ll
  test/Transforms/SimplifyCFG/implied-cond-hammock-diamond.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36287.109633.patch
Type: text/x-patch
Size: 11615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170803/f896cb8e/attachment.bin>


More information about the llvm-commits mailing list