llvm-6502/include/llvm
Silviu Baranga a420a14276 [LAA] Fix estimation of number of memchecks
Summary:
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.

Test Plan:
llvm test suite
spec2k
spec2k6

Performance results: no changes observed (not surprising since the formula for 1 writer is basically the same, which would covers most cases - at least with the current check limit).

Reviewers: anemet

Reviewed By: anemet

Subscribers: mzolotukhin, llvm-commits

Differential Revision: http://reviews.llvm.org/D10217

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239295 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-08 10:27:06 +00:00
..
ADT [bpf] rename triple names bpf_be -> bpfeb 2015-06-05 16:11:14 +00:00
Analysis [LAA] Fix estimation of number of memchecks 2015-06-08 10:27:06 +00:00
AsmParser
Bitcode Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
CodeGen [LoopVectorize] Teach Loop Vectorizor about interleaved memory accesses. 2015-06-08 06:39:56 +00:00
Config [omp] Add a configuration variable for the default OpenMP runtime. 2015-05-28 01:47:22 +00:00
DebugInfo Re-unique_ptrify LoadedObjectInfo::clone after it was reverted due to some other changes that broke on GCC around the same time 2015-06-04 20:54:32 +00:00
ExecutionEngine Re-unique_ptrify LoadedObjectInfo::clone after it was reverted due to some other changes that broke on GCC around the same time 2015-06-04 20:54:32 +00:00
IR [Statepoints] Mark statepoint intrinsic with Throws attribute 2015-06-03 16:18:58 +00:00
IRReader
LineEditor Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
Linker Linker: Add flag to override linkage rules 2015-04-22 04:11:00 +00:00
LTO Make the C++ LTO API easier to use from C++ clients. 2015-06-01 20:08:30 +00:00
MC [MC] Function naming NFC. 2015-06-07 20:29:37 +00:00
Object llvm-ar: Move archive writer to Object. 2015-06-08 02:32:01 +00:00
Option Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
Passes
ProfileData Tidy comments in SampleProfile header. NFC. 2015-05-12 22:03:00 +00:00
Support TargetParser: Fix comments in enum(s) introduced in r239150. [-Wdocumentation] 2015-06-06 01:41:35 +00:00
TableGen [TableGen] Use the SMLoc header file instead of SourceMgr header file in a couple places. NFC 2015-06-08 01:35:40 +00:00
Target Add isLegalAddressingMode address space argument to TTI 2015-06-07 20:12:03 +00:00
Transforms [GlobalMerge] Take into account minsize on Global users' parents. 2015-06-04 20:39:23 +00:00
CMakeLists.txt
InitializePasses.h Resubmit r237954 (MIR Serialization: print and parse LLVM IR using MIR format). 2015-05-27 18:02:19 +00:00
LinkAllIR.h
LinkAllPasses.h Add a speculative execution pass 2015-05-15 17:54:48 +00:00
module.modulemap Fix modules build post-r235612. 2015-04-23 23:22:26 +00:00
module.modulemap.build
Pass.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
PassAnalysisSupport.h
PassInfo.h
PassRegistry.h
PassSupport.h