@@ -60,26 +60,20 @@ Example:
6060### Restrictions on Dimensions and Symbols
6161
6262The affine dialect imposes certain restrictions on dimension and symbolic
63- identifiers to enable powerful analysis and transformation. An SSA value's use
64- can be bound to a symbolic identifier if that SSA value is either
65- 1 . a region argument for an op with trait ` PolyhedralScope ` (eg. ` FuncOp ` ),
66- 2 . a value defined at the top level of a ` PolyhedralScope ` op (i.e., immediately
67- enclosed by the latter),
68- 3 . a value that dominates the ` PolyhedralScope ` op enclosing the value's use,
69- 4 . the result of a [ ` constant ` operation] ( Standard.md#constant-operation ) ,
70- 5 . the result of an [ ` affine.apply `
71- operation] ( #affineapply-operation ) that recursively takes as arguments any valid
72- symbolic identifiers, or
73- 6 . the result of a [ ` dim ` operation] ( Standard.md#dim-operation ) on either a
74- memref that is an argument to a ` PolyhedralScope ` op or a memref where the
75- corresponding dimension is either static or a dynamic one in turn bound to a
76- valid symbol.
77-
78- Note that as a result of rule (3) above, symbol validity is sensitive to the
79- location of the SSA use. Dimensions may be bound not only to anything that a
80- symbol is bound to, but also to induction variables of enclosing
81- [ ` affine.for ` ] ( #affinefor-operation ) and
82- [ ` affine.parallel ` ] ( #affineparallel-operation ) operations, and the result of an
63+ identifiers to enable powerful analysis and transformation. A symbolic
64+ identifier can be bound to an SSA value that is either an argument to the
65+ function, a value defined at the top level of that function (outside of all
66+ loops and if operations), the result of a
67+ [ ` constant ` operation] ( Standard.md#constant-operation ) , or the result of an
68+ [ ` affine.apply ` operation] ( #affineapply-operation ) that recursively takes as
69+ arguments any symbolic identifiers, or the result of a [ ` dim `
70+ operation] ( Standard.md#dim-operation ) on either a memref that is a function
71+ argument or a memref where the corresponding dimension is either static or a
72+ dynamic one in turn bound to a symbolic identifier. Dimensions may be bound not
73+ only to anything that a symbol is bound to, but also to induction variables of
74+ enclosing [ ` affine.for ` ] ( #affinefor-affineforop ) and
75+ [ ` afffine.parallel ` ] ( #affineparallel-affineparallelop ) operations, and the
76+ result of an
8377[ ` affine.apply ` operation] ( #affineapply-operation ) (which recursively may use
8478other dimensions and symbols).
8579
0 commit comments