[llvm] [LV] Create block in mask up-front if needed. (PR #76635)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 1 14:00:59 PST 2024
https://github.com/ayalz approved this pull request.
This looks good to me, thanks! Adding some minor nits, and thoughts:
One alternative may be to continue generating masks on-demand, but place them at top of block, e.g., by having createBlockInMask() bump its Builder (temporarily) to first non-phi position in block. Another alternative is to have (subsequent) users of a mask move it above them, if/when needed.
Note that even if one generates all masks eagerly, as first non-phi's in block, it's possible for other non-phi's to be inserted above them. In general, predication should be done as a one-shot VPlan-to-VPlan transform (according to roadmap), including all (needed) masks and their predicated users.
https://github.com/llvm/llvm-project/pull/76635
More information about the llvm-commits
mailing list