[PATCH] D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 13 20:59:24 PDT 2018


mkazantsev updated this revision to Diff 165413.
mkazantsev added a comment.

Rebased on top of https://reviews.llvm.org/D51664. This patch is really helpful here because it makes the invalidation of `OrderedInstructions` automatic. With that, we *only* need to invalidate whenever we may actually change the first ICF instruction or when we erase a basic block. With that, I've discarded most of invalidation we've added on the previous steps because it is actually not needed. We don't need to invalidate when we insert Phis or do stuff like that.

I also think that the verification we have now is robust: it's up to OrderedInstructions to assert correctness of its auto-invalidation, and for ICF map we already have a pretty nice assertions that will tell us if we screwed up invalidating properly.


https://reviews.llvm.org/D50377

Files:
  include/llvm/Analysis/InstructionPrecedenceTracking.h
  include/llvm/Analysis/MustExecute.h
  lib/Analysis/MustExecute.cpp
  lib/Transforms/Scalar/LICM.cpp
  lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  lib/Transforms/Scalar/LoopUnswitch.cpp
  lib/Transforms/Utils/LoopUnrollAndJam.cpp
  test/Analysis/MustExecute/loop-header.ll
  test/Transforms/LICM/guards.ll
  test/Transforms/LICM/hoist-mustexec.ll
  test/Transforms/LICM/hoist-nounwind.ll
  test/Transforms/LICM/preheader-safe.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50377.165413.patch
Type: text/x-patch
Size: 22335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180914/97099c34/attachment.bin>


More information about the llvm-commits mailing list