[llvm-bugs] [Bug 45269] New: [SLP] getVectorElementSize() is slow

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 21 08:40:14 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45269

            Bug ID: 45269
           Summary: [SLP] getVectorElementSize() is slow
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: nikita.ppv at gmail.com
                CC: llvm-bugs at lists.llvm.org

Compiling shared_sha256.c from test-suite:

clang -DNDEBUG  -O3   -w -Werror=date-time -save-stats=obj -DHAVE_CONFIG_H
-I/home/nikic/llvm-test-suite/MultiSource/Applications/ClamAV
-I/home/nikic/llvm-test-suite/MultiSource/Applications/ClamAV/zlib
-DDONT_LOCK_DBDIRS -DC_LINUX -DFPU_WORDS_BIGENDIAN=0 -DWORDS_BIGENDIAN=0
-save-stats=obj -MD -MT
MultiSource/Applications/ClamAV/CMakeFiles/clamscan.dir/shared_sha256.c.o -MF
MultiSource/Applications/ClamAV/CMakeFiles/clamscan.dir/shared_sha256.c.o.d -o
MultiSource/Applications/ClamAV/CMakeFiles/clamscan.dir/shared_sha256.c.o   -c
../MultiSource/Applications/ClamAV/shared_sha256.c

50% of the time is taken up by SLP vectorization, with 35% inside
getVectorElementSize().

The function for reference:
https://github.com/llvm/llvm-project/blob/601d25cb736d8b67e642faa06f9e956c67fd25d9/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp#L5299

It performs a full instruction scan starting from a root, which may end up
visiting a very large number of instructions.

Is it possible to limit this walk in some way?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200321/2082c98a/attachment.html>


More information about the llvm-bugs mailing list