[VPlan] Use recursive traversal iterator in VPSlotTracker.
authorFlorian Hahn <flo@fhahn.com>
Tue, 27 Apr 2021 11:21:27 +0000 (12:21 +0100)
committerFlorian Hahn <flo@fhahn.com>
Tue, 27 Apr 2021 11:39:06 +0000 (12:39 +0100)
commit160e729cf0011da9eacea60cb325a2b506dc7b39
tree7a3319e434c8ab6dfdb738052a0464fc6a47ffbf
parentf818ec9dd173bfacd0ee8b403146c26e17271a46
[VPlan] Use recursive traversal iterator in VPSlotTracker.

This patch simplifies VPSlotTracker by using the recursive traversal
iterator to traverse all blocks in a VPlan in reverse post-order when
numbering VPValues in a plan.

This depends on a fix to RPOT (D100169). It also extends the traversal
unit tests to check RPOT.

Reviewed By: a.elovikov

Differential Revision: https://reviews.llvm.org/D100176
llvm/lib/Transforms/Vectorize/VPlan.cpp
llvm/lib/Transforms/Vectorize/VPlanValue.h