[all-commits] [llvm/llvm-project] df3b95: [SLP][NFC] PR45269 getVectorElementSize() is slow

Dinar Temirbulatov via All-commits all-commits at lists.llvm.org
Thu May 21 08:27:38 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: df3b95bc0ae0f9de0a54db897ed37ffb6ba44226
      https://github.com/llvm/llvm-project/commit/df3b95bc0ae0f9de0a54db897ed37ffb6ba44226
  Author: Dinar Temirbulatov <dtemirbulatov at gmail.com>
  Date:   2020-05-21 (Thu, 21 May 2020)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

  Log Message:
  -----------
  [SLP][NFC] PR45269 getVectorElementSize() is slow

The algorithm inside getVectorElementSize() is almost O(x^2) complexity and
when, for example, we compile MultiSource/Applications/ClamAV/shared_sha256.c
with 1k instructions inside sha256_transform() function that resulted in almost
~800k iterations. The following change improves the algorithm with the map to
a liner complexity.

Differential Revision: https://reviews.llvm.org/D80241




More information about the All-commits mailing list