Implement prototype of a simple cache model.

A simple cache model, parameterized by number of lines and size (in
bytes) of each line, can be turned on using the -bf-cache-model flag.
This requires that unique bytes be tracked (using the -bf-unique-bytes
flag) to get the IR-level address of every load and store.
Report performance of cache model.

Turn on the reporting functionality of the cache model. Before, when the
-bf-cache-model flag was used, the accesses would be modeled but no
information would be reported. This model reports performance for each
size up to the maximum of -bf-cache-lines in powers of two: a hit to
line n implies a hit to all lines >=n.
Dynamically resize cache to account for all accesses.

Rather than specifying the absolute size of the cache, allow it to grow
in size dynamically. When a line misses in the cache, increase the cache
size by a single line and set its hit count to the LRU slot's hit count
plus one. This also removes the need to maintain an access count per
line, as that would only give the number of times the nth line of an n
line cache would be accesses.
Report cache performance as the size required to account for n percent
of all accesses.

Instead of reporting the cache hit rates as the cache size doubles,
display the size of cache needed to account for n percent of all
accesses. n grows by 5 percent and always includes 100% (ie size of
unique accesses).
Initialize hit count for new lines to total number of accesses so far.
Add flag for dumping out cache stats to file.

Use -bf-dump-cache flag in conjunctin with -bf-cache-model to dump a log
of all cache information (hits associated with each line) to the file
"cache.dump" in the working directory of the running application.
Add script to parse cache dump file.

Python script that takes a cache dump file and a list of cache sizes and
prints, for each, the number of accesses that would occur to that cache
size. Requires Python 2.7+.
One one access happens per line, not per byte.

Before, each byte address requested would count as a separate request.
This has been replaced with a count of the number of cache lines
touched. It's possible that all addresses fit entirely inside a single
line, and therefore only count as a single access. However, it's
possible that the request is not aligned, and would then require
multiple cache requests.
Remove -bf-unique-bytes as a prereq for -bf-cache-model.

Recording -bf-unique-bytes is no longer a prereq for the cache model,
although the two can work together.
Increment total accesses with the number of distinct cache lines requested.
Tally unique hits to the cache and sum total hits later.

During execution, only record unique cache hits, associating a hit
with the cache line. At the end of execution, the total number of
hits a cache size N would have is equal to the sum of all unique
hits to caches sized N and smaller.
Count and report only the hits that occur.

On a miss, add a new line with only a single hit. Then only start
counting the number of total hits with zero.
Deduct cold misses from reported total hits.

Cold hits occur whenever a line is requested that has never made it to
the cache, and therefor misses in all levels. Increment a counter
whenever the line is not found in the cache and deduct that value from
each line's total hits.
Report cold misses in cache dump.

Report the number of cold misses in the cache dump so we can calculate
the miss rate for caches that are bigger than the total unique
addresses.
Simplify handling of cold misses.

The cold miss counter is equivalent to the number of unique addresses in
the cache. This in turn is equivalent to the number of lines in the
cache, and therefor doesn't need to be recorded. As well, any time there
is a miss in the cache, don't record it as a hit; this communicates all
cold misses the same way as the counter did.
Report split accesses.

Record and report the number of times a single call accessing the cache
is split among multiple cache lines.
Include cold miss info when parsing dumps.

The cache dump parsing script now pays attention to the cold miss
information when tabulating access count.
Assign a cache to each thread.

Each thread gets its own private cache structure. At the end execution,
cache performance for all threads are merged into a single report such
that total hits to cache size N = sum(hits to thread i cache size N) for
all threads i.
Distribute bf-parse-cache-dump script on install.

Include the parsing script in the install destination.
Pass back split access count.

This function implementation was deleted somehow. Oops.