Invariant intrinsics -- Comparative stats analysis
Larisse Voufo via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 29 18:30:05 PST 2016
A quick note to drop a quick summary of my meeting with Nick (below).
The number of generated intrinsics is significant enough to validate the
Also helps to know that the stats are the same regardless of whether
the host compiler for the LLVM binaries is GCC or Clang.
Expected wins from GVN:
Number of equalities propagated: 416 : 1.24%
Number of instructions deleted 43905 : 3.51%
Number of instructions simplified 678 : 0.25%
Number of loads deleted 30762 : 9.26%
Number of loads PRE’d 9826 : 10.77%
Undesired losses from GVN
Number of blocks merged -301 : -6.51%
Number of instructions PRE’d -1023 : -2.94%
Losses could be due to the fact that other parts of the compilation
pipeline do not know about invariant intrinsics yet.
Need to teach other passes about the intrinsics,
in particular, -sroa and -early-cse,
then -functionattrs, -inline, etc…
The current patch does not have to wait for other passes to learn
about the intrinsics, but
The corresponding Clang patch (generating the intrinsics) will have
to wait until the passes are properly taught.
A positive effect in -instcombine:
Number of constants folds, instructions combined, and instructions
- GVN may have set this up well for -instcombine, even though
-instcombine does not know about invariant intrinsics yet!
Have a good weekend!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits