[PATCH] D32720: [LICM] Introduce a finer granularity option to compute early exits.

Xin Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 18:10:46 PDT 2017


trentxintong updated this revision to Diff 103131.
trentxintong added a comment.

Fix a bug in how early exits are updated. Apparently, LICM could simplify or delete early exits,
e.g. some calls that are simplifiable, but we treat as early exit.

Build the deleteExit interface for the early exit to be updated. EarlyExits are now kept in a DenseSet
which means iterating over is not deterministic. But this is ok as we need to make sure the interested
instruction dominates ALL.

The test case which the bug is uncovered is Transforms/LICM/pr32129.ll.


https://reviews.llvm.org/D32720

Files:
  include/llvm/Transforms/Utils/LoopUtils.h
  include/llvm/Transforms/Utils/OrderedInstructions.h
  lib/Transforms/Scalar/LICM.cpp
  lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  lib/Transforms/Scalar/LoopUnswitch.cpp
  lib/Transforms/Utils/LoopUtils.cpp
  lib/Transforms/Utils/OrderedInstructions.cpp
  test/Transforms/LICM/loop-early-exits.ll
  test/Transforms/LICM/preheader-safe.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32720.103131.patch
Type: text/x-patch
Size: 21276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170620/c1650c9a/attachment.bin>


More information about the llvm-commits mailing list