After some changes in SLP vectorizer we missed some additional checks to
limit the number of instructions for vectorization. We should not perform analysis
of the instructions if the parent of instruction is not the same as the
parent of the first instruction in the tree or it was analyzed already.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/Vectorize/SLPVectorizer.cpp | ||
---|---|---|
4771 ↗ | (On Diff #104886) | Could you please explain why you bail out here? If it's for clamping the number of operands, that'll get operated on the loop below, why not just limit the recursion depth to 6 instead of 12? |
4825 ↗ | (On Diff #104886) | Please add a comment here explicitly stating that you're limiting this to the same basic block to save compile time. |
lib/Transforms/Vectorize/SLPVectorizer.cpp | ||
---|---|---|
4771 ↗ | (On Diff #104886) | I tried to reduce the number of checks for PHINode inside the loop and reduce number of ush_backs/pop_backs to Stack. In the existing code if the next instruction is PHINode, we push_back it to Stack, then pop it up from Stack and drop it. New code tries to avoid such extra dummy operations. |
4825 ↗ | (On Diff #104886) | Will do |