[PATCH] D114171: [SLP]Improve reductions analysis and emission, part 1.

Alexander Kornienko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 16:58:33 PDT 2022


alexfh added a comment.

In D114171#3528093 <https://reviews.llvm.org/D114171#3528093>, @ABataev wrote:

> Aha, I committed 4e271fc49517362a9333371fb1ab7e865d4c1b0e <https://reviews.llvm.org/rG4e271fc49517362a9333371fb1ab7e865d4c1b0e> earlier today, which should improve it. Try to update the compiler.

Thanks! This patch makes SLP vectorizer pass much faster on the problematic input, but it doesn't completely compensate the slowdown introduced here.  This is how -ftime-report looks like after 4e271fc49517362a9333371fb1ab7e865d4c1b0e <https://reviews.llvm.org/rG4e271fc49517362a9333371fb1ab7e865d4c1b0e>:

  ===-------------------------------------------------------------------------===
                        ... Pass execution timing report ...
  ===-------------------------------------------------------------------------===
    Total Execution Time: 308.9466 seconds (308.9519 wall clock)
  
     ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
    132.7263 ( 45.9%)   0.0001 (  0.0%)  132.7264 ( 43.0%)  132.7351 ( 43.0%)  SLPVectorizerPass
    48.0866 ( 16.6%)   5.7199 ( 29.3%)  53.8065 ( 17.4%)  53.8123 ( 17.4%)  ModuleInlinerWrapperPass
    47.3402 ( 16.4%)   5.4604 ( 27.9%)  52.8007 ( 17.1%)  52.8060 ( 17.1%)  DevirtSCCRepeatedPass
    22.2568 (  7.7%)   0.3222 (  1.6%)  22.5790 (  7.3%)  22.5785 (  7.3%)  GVNPass
    11.3194 (  3.9%)   1.0507 (  5.4%)  12.3701 (  4.0%)  12.3520 (  4.0%)  InstCombinePass
     4.8834 (  1.7%)   1.2548 (  6.4%)   6.1382 (  2.0%)   6.1350 (  2.0%)  InlinerPass

And this is how it looked at 38d0df557706940af5d7110bdf662590449f8a60 <https://reviews.llvm.org/rG38d0df557706940af5d7110bdf662590449f8a60> (the closest commit before 7ea03f0b4e4ec5d91d48ba2976f5adc299089ffd <https://reviews.llvm.org/rG7ea03f0b4e4ec5d91d48ba2976f5adc299089ffd> where I could compile clang):

  ===-------------------------------------------------------------------------===
                        ... Pass execution timing report ...
  ===-------------------------------------------------------------------------===
    Total Execution Time: 181.4693 seconds (181.4723 wall clock)
  
     ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
    48.1675 ( 29.7%)   5.6593 ( 29.3%)  53.8269 ( 29.7%)  53.8332 ( 29.7%)  ModuleInlinerWrapperPass
    47.4270 ( 29.2%)   5.3983 ( 28.0%)  52.8253 ( 29.1%)  52.8315 ( 29.1%)  DevirtSCCRepeatedPass
    22.1909 ( 13.7%)   0.2916 (  1.5%)  22.4824 ( 12.4%)  22.4825 ( 12.4%)  GVNPass
    11.1989 (  6.9%)   1.0292 (  5.3%)  12.2281 (  6.7%)  12.2204 (  6.7%)  InstCombinePass
     4.9943 (  3.1%)   1.1928 (  6.2%)   6.1871 (  3.4%)   6.1842 (  3.4%)  InlinerPass
     5.2197 (  3.2%)   0.0000 (  0.0%)   5.2198 (  2.9%)   5.2201 (  2.9%)  SLPVectorizerPass

Note the 5s -> 130s jump in time spent in SLPVectorizerPass. I'll grab the profile for the updated binary, but it will take some time. And yes, still trying to reduce the test case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114171/new/

https://reviews.llvm.org/D114171



More information about the llvm-commits mailing list