[PATCH] [LAA] Fix estimation of number of memchecks

silviu.baranga at arm.com silviu.baranga at arm.com
Wed Jun 3 09:43:41 PDT 2015


Hi anemet,

We need to add a runtime memcheck for pair of accesses (x,y) where at least one of x and y
are writes.
 
Assuming we have w writes and r reads, currently this number is  estimated as being
w* (w+r-1). This estimation will count (write,write) pairs twice and will overestimate
the number of checks required.

This change adds a getNumberOfChecks method to RuntimePointerCheck, which
will count the number of runtime checks needed (similar in implementation to
needsAnyChecking) and uses it to produce the correct number of runtime checks.

http://reviews.llvm.org/D10217

Files:
  include/llvm/Analysis/LoopAccessAnalysis.h
  lib/Analysis/LoopAccessAnalysis.cpp
  test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10217.27044.patch
Type: text/x-patch
Size: 5667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150603/0c7ba17c/attachment.bin>


More information about the llvm-commits mailing list