[PATCH] Analyze recursive PHI nodes in BasicAA
Tobias Edler von Koch
tobias at codeaurora.org
Sat Jun 20 09:26:34 PDT 2015
Hi Daniel, Hal,
I've evaluated the patch on the SPEC CPU2006 C/C++ benchmarks. Here are
1. How many aliasPHI queries on recursive PHI nodes are there and what
are their results?
NoAlias 81317/10.6% (before) 118549/18.1% (after)
MayAlias 685637/89.4% (before) 534856/81.4% (after)
PartialAlias 0/ 0.0% (before) 3325/ 0.5% (after)
Total 766954 (before) 656730 (after)
As you can see, the share of NoAlias results for these queries goes up
noticeably. What's also interesting is that there is a 14.4% reduction
in total queries on recursive PHI nodes with the patch.
2. What is the average number of incoming values on recursive PHI nodes?
There were 2 incoming values (one recursive, one 'real' value) in all
but 102 (0.013%) of aliasPHI queries on recursive PHI nodes before the
patch. With the patch, there were 103 queries with more than 2 incoming
values. So two incoming values is indeed the common case.
3. What is the compile time impact of the change?
I ran the SPEC2006 build 5 times, discarding the numbers for the first
build to warm up the fs cache. Without the patch, the average build
time over the remaining four builds is 5023.913s. With the patch, it is
5023.713s. Pretty much unchanged.
4. What is the impact of the change on the execution time of the
This is with the ref data set, average of three runs.
(Speedup, higher is better)
Not a huge change here although the numbers tend to be more on the side
of a slowdown. This is interesting - you'd think that better alias
analysis shouldn't have that effect. Any idea what could be causing
this? The numbers are from a real machine though so I'd expect
something like 1-2% noise, so it could be just that.
I hope this answers some of your questions!
More information about the llvm-commits