@@ -165,9 +165,8 @@ std::string getVariableName(Value v, bool preferDemangledName) {
165165 // When the demangled name is requested - demangle it.
166166 if (preferDemangledName) {
167167 auto [kind, deconstructed] = fir::NameUniquer::deconstruct (srcName);
168- if (kind != fir::NameUniquer::NameKind::NOT_UNIQUED) {
168+ if (kind != fir::NameUniquer::NameKind::NOT_UNIQUED)
169169 return prefix + deconstructed.name + suffix;
170- }
171170 }
172171
173172 return prefix + srcName + suffix;
@@ -182,13 +181,12 @@ bool areAllBoundsConstant(llvm::ArrayRef<Value> bounds) {
182181
183182 // Check if this bound has constant values
184183 bool hasConstant = false ;
185- if (dataBound.getLowerbound () && dataBound.getUpperbound ()) {
184+ if (dataBound.getLowerbound () && dataBound.getUpperbound ())
186185 hasConstant =
187186 fir::getIntIfConstant (dataBound.getLowerbound ()).has_value () &&
188187 fir::getIntIfConstant (dataBound.getUpperbound ()).has_value ();
189- } else if (dataBound.getExtent ()) {
188+ else if (dataBound.getExtent ())
190189 hasConstant = fir::getIntIfConstant (dataBound.getExtent ()).has_value ();
191- }
192190
193191 if (!hasConstant)
194192 return false ;
@@ -247,21 +245,18 @@ std::string getRecipeName(mlir::acc::RecipeKind kind, Type type, Value var,
247245 case mlir::acc::RecipeKind::firstprivate_recipe:
248246 prefixOS << " firstprivatization" ;
249247 // Add bounds to the prefix if applicable (only for firstprivate)
250- if (!bounds.empty () && areAllBoundsConstant (bounds)) {
248+ if (!bounds.empty () && areAllBoundsConstant (bounds))
251249 prefixOS << getBoundsString (bounds);
252- }
253250 break ;
254251 case mlir::acc::RecipeKind::reduction_recipe:
255252 prefixOS << " reduction" ;
256253 // Embed the reduction operator in the prefix
257- if (reductionOp != mlir::acc::ReductionOperator::AccNone) {
254+ if (reductionOp != mlir::acc::ReductionOperator::AccNone)
258255 prefixOS << " _"
259256 << mlir::acc::stringifyReductionOperator (reductionOp).str ();
260- }
261257 // Add bounds to the prefix if applicable (only for reduction)
262- if (!bounds.empty () && areAllBoundsConstant (bounds)) {
258+ if (!bounds.empty () && areAllBoundsConstant (bounds))
263259 prefixOS << getBoundsString (bounds);
264- }
265260 break ;
266261 }
267262
0 commit comments