[VPlan] Add VPValue::isDefinedOutsideVectorRegions helper (NFC).
authorFlorian Hahn <flo@fhahn.com>
Wed, 19 Oct 2022 12:20:30 +0000 (13:20 +0100)
committerFlorian Hahn <flo@fhahn.com>
Wed, 19 Oct 2022 12:20:30 +0000 (13:20 +0100)
commitd72fcee8f47d54a68cab516d7f5a422ba48687f4
tree8dd2a66d1ec7075e93a9f382bf762c26f059ad98
parent62116c8f0b5b7aac3d53f1bd2445356ae6866048
[VPlan] Add VPValue::isDefinedOutsideVectorRegions helper (NFC).

@Ayal suggested a better named helper than using `!getDef()` to check if
a value is invariant across all parts.

The property we are using here is that the VPValue is defined outside
any vector loop region. There's a TODO left to handle recipes defined in
pre-header blocks.

Reviewed By: reames

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