[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 Feb 12 07:22:28 PST 2016


sbaranga created this revision.
sbaranga added reviewers: sanjoy, anemet, mzolotukhin, hfinkel.
sbaranga added a subscriber: llvm-commits.
Herald added subscribers: mzolotukhin, sanjoy.

When the backedge taken codition is computed from an icmp, SCEV can
deduce the backedge taken count only if one of the sides of the icmp
is an AddRecExpr. However, due to sign/zero extensions, we sometimes
end up with something that is not an AddRecExpr.

However, we can use SCEV predicates to produce a 'guarded' expression.
This change adds a method to SCEV to get this expression, and the
SCEV predicate associated with it.

In HowManyGreaterThans and HowManyLessThans we will now add a SCEV
predicate associated with the guarded backedge taken count when the
analyzed SCEV expression is not an AddRecExpr. Note that we only do
this as an alternative to returning a 'CouldNotCompute'.

We use new feature in Loop Access Analysis and LoopVectorize to analyze
and transform more loops.

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/Transforms/LoopVectorize/AArch64/backedge-overflow.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17201.47800.patch
Type: text/x-patch
Size: 29743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160212/3f859944/attachment-0001.bin>


More information about the llvm-commits mailing list