[flang-commits] [flang] [mlir] [flang][acc] Update stride calculation to include inner-dimensions (PR #136613)
via flang-commits
flang-commits at lists.llvm.org
Mon Apr 21 14:12:26 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- flang/include/flang/Lower/DirectivesCommon.h flang/include/flang/Optimizer/Builder/DirectivesCommon.h flang/lib/Lower/OpenACC.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/include/flang/Lower/DirectivesCommon.h b/flang/include/flang/Lower/DirectivesCommon.h
index 1020d32a0..d39d6eb10 100644
--- a/flang/include/flang/Lower/DirectivesCommon.h
+++ b/flang/include/flang/Lower/DirectivesCommon.h
@@ -670,7 +670,8 @@ genBoundsOps(fir::FirOpBuilder &builder, mlir::Location loc,
const std::vector<Fortran::evaluate::Subscript> &subscripts,
std::stringstream &asFortran, fir::ExtendedValue &dataExv,
bool dataExvIsAssumedSize, fir::factory::AddrAndBoundsInfo &info,
- bool treatIndexAsSection = false, bool strideIncludeLowerExtent = false) {
+ bool treatIndexAsSection = false,
+ bool strideIncludeLowerExtent = false) {
int dimension = 0;
mlir::Type idxTy = builder.getIndexType();
mlir::Type boundTy = builder.getType<BoundsType>();
@@ -1024,7 +1025,8 @@ fir::factory::AddrAndBoundsInfo gatherDataOperandAddrAndBounds(
if (genDefaultBounds &&
mlir::isa<fir::SequenceType>(fir::unwrapRefType(info.addr.getType())))
bounds = fir::factory::genBaseBoundsOps<BoundsOp, BoundsType>(
- builder, operandLocation, dataExv, dataExvIsAssumedSize, strideIncludeLowerExtent);
+ builder, operandLocation, dataExv, dataExvIsAssumedSize,
+ strideIncludeLowerExtent);
asFortran << symRef->get().name().ToString();
} else { // Unsupported
llvm::report_fatal_error("Unsupported type of OpenACC operand");
diff --git a/flang/include/flang/Optimizer/Builder/DirectivesCommon.h b/flang/include/flang/Optimizer/Builder/DirectivesCommon.h
index eec70a1d6..00db1836e 100644
--- a/flang/include/flang/Optimizer/Builder/DirectivesCommon.h
+++ b/flang/include/flang/Optimizer/Builder/DirectivesCommon.h
@@ -236,8 +236,8 @@ genBaseBoundsOps(fir::FirOpBuilder &builder, mlir::Location loc,
loc, cummulativeExtent, extent);
}
- mlir::Value bound =
- builder.create<BoundsOp>(loc, boundTy, lb, ub, extent, stride, false, baseLb);
+ mlir::Value bound = builder.create<BoundsOp>(loc, boundTy, lb, ub, extent,
+ stride, false, baseLb);
bounds.push_back(bound);
}
return bounds;
``````````
</details>
https://github.com/llvm/llvm-project/pull/136613
More information about the flang-commits
mailing list