Invariant intrinsics -- Comparative stats analysis

Larisse Voufo via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 18:30:05 PST 2016


Hello All,

A quick note to drop a quick summary of my meeting with Nick (below).


Stats at:
https://docs.google.com/spreadsheets/d/19W1167l9QFrXMXccX4-cValmC5EtlFfUbT7Tr3xaoJs/edit?usp=sharing#gid=1063925865


Summary/Highlights:

   -

   The number of generated intrinsics is significant enough to validate the
   analysis.
   -

      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
      sunk.
      - GVN may have set this up well for -instcombine, even though
      -instcombine does not know about invariant intrinsics yet!



Have a good weekend!
-- Larisse.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160129/e9db25e9/attachment.html>


More information about the llvm-commits mailing list