File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -1090,6 +1090,21 @@ InstructionCost VPlan::cost(ElementCount VF, VPCostContext &Ctx) {
1090
1090
return getVectorLoopRegion ()->cost (VF, Ctx);
1091
1091
}
1092
1092
1093
+ VPRegionBlock *VPlan::getVectorLoopRegion () {
1094
+ // TODO: Cache if possible.
1095
+ for (VPBlockBase *B : vp_depth_first_shallow (getEntry ()))
1096
+ if (auto *R = dyn_cast<VPRegionBlock>(B))
1097
+ return R;
1098
+ return nullptr ;
1099
+ }
1100
+
1101
+ const VPRegionBlock *VPlan::getVectorLoopRegion () const {
1102
+ for (const VPBlockBase *B : vp_depth_first_shallow (getEntry ()))
1103
+ if (auto *R = dyn_cast<VPRegionBlock>(B))
1104
+ return R;
1105
+ return nullptr ;
1106
+ }
1107
+
1093
1108
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1094
1109
void VPlan::printLiveIns (raw_ostream &O) const {
1095
1110
VPSlotTracker SlotTracker (this );
@@ -1167,21 +1182,6 @@ std::string VPlan::getName() const {
1167
1182
return Out;
1168
1183
}
1169
1184
1170
- VPRegionBlock *VPlan::getVectorLoopRegion () {
1171
- // TODO: Cache if possible.
1172
- for (VPBlockBase *B : vp_depth_first_shallow (getEntry ()))
1173
- if (auto *R = dyn_cast<VPRegionBlock>(B))
1174
- return R;
1175
- return nullptr ;
1176
- }
1177
-
1178
- const VPRegionBlock *VPlan::getVectorLoopRegion () const {
1179
- for (const VPBlockBase *B : vp_depth_first_shallow (getEntry ()))
1180
- if (auto *R = dyn_cast<VPRegionBlock>(B))
1181
- return R;
1182
- return nullptr ;
1183
- }
1184
-
1185
1185
LLVM_DUMP_METHOD
1186
1186
void VPlan::printDOT (raw_ostream &O) const {
1187
1187
VPlanPrinter Printer (O, *this );
You can’t perform that action at this time.
0 commit comments