[PATCH] D14185: Extende SLP Vectorizer to deal with aggregates
Arch D. Robison via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 29 12:59:27 PDT 2015
ArchDRobison created this revision.
ArchDRobison added reviewers: aschwaighofer, majnemer.
ArchDRobison added a subscriber: llvm-commits.
This patch extends SLP Vectorizer to vectorize code involving structs/arrays that resemble vectors. The motivation, as explained [[ http://lists.llvm.org/pipermail/llvm-dev/2015-October/091395.html | here ]] is to vectorize tuples and structs in Julia that act like vectors.
Per Arnold Schwaighofer's [[ http://lists.llvm.org/pipermail/llvm-dev/2015-October/091410.html| suggestion ]], the improvement works backwards from a store of insert value instructions, and adds a peephole optimization to inst-combine to clean up.
I limited the SLPVectorization change to aggregates that resemble vectors of length 2, 4, 8, or 16 since other lengths seem unlikely to pay off, but I could be wrong.
In some spots, I changed logic for "extractelement" to be "polymorphic" to "extractelement" or "extractvalue". In other places (e.g. findBuildVector"), that seemed to be more trouble than it was worth and so I coded custom logic (e.g. findBuildAggregate).
http://reviews.llvm.org/D14185
Files:
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/InstCombine/insert-val-extract-elem.ll
test/Transforms/SLPVectorizer/X86/insertvalue.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14185.38757.patch
Type: text/x-patch
Size: 17493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151029/9317541d/attachment.bin>
More information about the llvm-commits
mailing list