# Changeset View

Changeset View

# Standalone View

Standalone View

# flang/include/flang/Optimizer/Dialect/FIROps.td

Show First 20 Lines • Show All 1,627 Lines • ▼ Show 20 Lines | |||||

def fir_CoordinateOp : fir_Op<"coordinate_of", [NoSideEffect]> { | def fir_CoordinateOp : fir_Op<"coordinate_of", [NoSideEffect]> { | ||||

let summary = "Finds the coordinate (location) of a value in memory"; | let summary = "Finds the coordinate (location) of a value in memory"; | ||||

let description = [{ | let description = [{ | ||||

Compute the internal coordinate address starting from a boxed value or | Compute the internal coordinate address starting from a boxed value or | ||||

unboxed memory reference. Returns a memory reference. When computing the | unboxed memory reference. Returns a memory reference. When computing the | ||||

coordinate of an array element, the rank of the array must be known and | coordinate of an array element, the rank of the array must be known and | ||||

the number of indexing expressions must equal the rank of the array. | the number of indexing expressions must not exceed the rank of the array. | ||||

This operation will apply the access map from a boxed value implicitly. | This operation will apply the access map from a boxed value implicitly. | ||||

Unlike LLVM's GEP instruction, one cannot stride over the outermost | Unlike LLVM's GEP instruction, one cannot stride over the outermost | ||||

reference; therefore, the leading 0 index must be omitted. | reference; therefore, the leading 0 index must be omitted. | ||||

```mlir | ```mlir | ||||

%i = ... : index | %i = ... : index | ||||

▲ Show 20 Lines • Show All 1,255 Lines • Show Last 20 Lines |