[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
the results.
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
benchmarks?
This is with the ref data set, average of three runs.
(Speedup, higher is better)
400.perlbench 0.991404586
401.bzip2 0.999081718
403.gcc 1.006213196
429.mcf 0.990988836
445.gobmk 0.994521527
456.hmmer 0.996110677
458.sjeng 0.993703064
462.libquantum 1.014540594
464.h264ref 0.996489267
471.omnetpp 0.986799815
473.astar 0.987321483
483.xalancbmk 0.985122405
433.milc 1.023695308
444.namd 0.998587195
447.dealII 0.999585507
450.soplex 1.001369759
453.povray 0.978606911
470.lbm 1.018186381
482.sphinx3 0.998224144
Average 0.997923809
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!
Tobias
http://reviews.llvm.org/D10368
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list