HomePhabricator

[LoopVec] Support non-instructions as argument to uniform mem ops

Authored by reames on Dec 3 2020, 2:49 PM.

Description

[LoopVec] Support non-instructions as argument to uniform mem ops

The initial step of the uniform-after-vectorization (lane-0 demanded only) analysis was very awkwardly written. It would revisit use list of each pointer operand of a widened load/store. As a result, it was in the worst case O(N^2) where N was the number of instructions in a loop, and had restricted operand Value types to reduce the size of use lists.

This patch replaces the original algorithm with one which is at most O(2N) in the number of instructions in the loop. (The key observation is that each use of a potentially interesting pointer is visited at most twice, once on first scan, once in the use list of *it's* operand. Only instructions within the loop have their uses scanned.)

In the process, we remove a restriction which required the operand of the uniform mem op to itself be an instruction. This allows detection of uniform mem ops involving global addresses.

Differential Revision: https://reviews.llvm.org/D92056

Details

Committed
reamesDec 3 2020, 2:51 PM
Differential Revision
D92056: [LoopVec] Support global addresses as argument to uniform mem ops
Parents
rG55db6ec1cc20: [BasicAA] Move newline to dump from printer
Branches
Unknown
Tags
Unknown