[PATCH] D17201: [SCEV] Introduce a guarded backedge taken count and use it in LAA and LV

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 18 10:06:14 PDT 2016


sbaranga updated this revision to Diff 51037.
sbaranga added a comment.

Reworked the ExitNotTakenInfo allocation scheme to avoid allocating
un-needed SCEVUnionPredicates.

The new allocation scheme follows Sanjoy's idea:
we have a new optional structure that can hold optional (almost always not
needed) data. The optional data contains a SCEVPredicate and a vector
of ExitNotTakenInfo structs. The first elemet has the optional info if it
has a SCEVPredicate or there are more than one loop exits. The other
ExitNotTakenInfo structs will contain the extra info only if they have
a SCEVPredicate.

Note that we could pottentially modify this scheme such that the first
loop exit has a union of all the SCEV predicates (which doesn't have
the per-exit information, but uses less memory - in the cases where
we do need SCEV predicates).

Since the new structure is not trivial to traverse, we also have a new
iterator for this (which keeps the traversals simple to write).

Also followed up on the reset of the review comments from the last round.


http://reviews.llvm.org/D17201

Files:
  include/llvm/Analysis/ScalarEvolution.h
  lib/Analysis/LoopAccessAnalysis.cpp
  lib/Analysis/ScalarEvolution.cpp
  lib/Analysis/ScalarEvolutionExpander.cpp
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Analysis/ScalarEvolution/predicated-trip-count.ll
  test/Transforms/LoopVectorize/AArch64/backedge-overflow.ll
  test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17201.51037.patch
Type: text/x-patch
Size: 55490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160318/4109828c/attachment.bin>


More information about the llvm-commits mailing list