[llvm] [mlir] [MLIR][OpenMP] Fix and simplify bounds offset calculation for 1-D GEP offsets (PR #165486)
Pranav Bhandarkar via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 29 21:35:28 PDT 2025
================
@@ -4125,46 +4125,28 @@ calculateBoundsOffset(LLVM::ModuleTranslation &moduleTranslation,
// with a pointer that's being treated like an array and we have the
// underlying type e.g. an i32, or f64 etc, e.g. a fortran descriptor base
// address (pointer pointing to the actual data) so we must caclulate the
- // offset using a single index which the following two loops attempts to
- // compute.
-
- // Calculates the size offset we need to make per row e.g. first row or
- // column only needs to be offset by one, but the next would have to be
- // the previous row/column offset multiplied by the extent of current row.
+ // offset using a single index which the following loop attempts to
+ // compute using the standard column-major algorihtm e.g for a 3D array:
----------------
bhandarkar-pranav wrote:
nit: 's/algorihtm/algorithm'
https://github.com/llvm/llvm-project/pull/165486
More information about the llvm-commits
mailing list