OSDN Git Service

SLPVectorizer: When CSEing generated gathers only scan blocks containing them.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 3 Nov 2013 12:27:52 +0000 (12:27 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 3 Nov 2013 12:27:52 +0000 (12:27 +0000)
commit0c7ba3cef2d99bf15175303d5e2523fe898d009d
treef5744b876df5b9ea7b50020d3b29686745d3080a
parent16d10987184281aff35c80542a3c02e7dcb7b59b
SLPVectorizer: When CSEing generated gathers only scan blocks containing them.

Instead of doing a RPO traversal of the whole function remember the blocks
containing gathers (typically <= 2) and scan them in dominator-first order.

The actual CSE is still quadratic, but I'm not confident that adding a
scoped hash table here is worth it as we're only looking at the generated
instructions and not arbitrary code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193956 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp