[all-commits] [llvm/llvm-project] 6b07a9: [mlir] Introduce more intuitive wording for attrib...

Sean Silva via All-commits all-commits at lists.llvm.org
Wed Feb 10 15:23:35 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b07a978350ff738b81866c6c9114770f997b2fc
      https://github.com/llvm/llvm-project/commit/6b07a978350ff738b81866c6c9114770f997b2fc
  Author: Sean Silva <silvasean at google.com>
  Date:   2021-02-10 (Wed, 10 Feb 2021)

  Changed paths:
    M mlir/docs/LangRef.md

  Log Message:
  -----------
  [mlir] Introduce more intuitive wording for attributes.

After discussion, it seems like we want to go with
"inherent/discardable". These seem to best capture the relationship with
the op semantics and don't conflict with other terms.

Please let me know your preferences. Some of the other contenders are:

```
"intrinsic" side | "annotation" side
-----------------+------------------
characteristic   | annotation
closed           | open
definitional     | advisory
essential        | discardable
expected         | unexpected
innate           | acquired
internal         | external
intrinsic        | extrinsic
known            | unknown
local            | global
native           | foreign
inherent         | acquired
```

Rationale:

- discardable: good. discourages use for stable data.
- inherent: good
- annotation: redundant and doesn't convey difference
- intrinsic: confusable with "compiler intrinsics".
- definitional: too much of a mounthful
- extrinsic: too exotic of a word and hard to say
- acquired: doesn't convey the relationship to the semantics
- internal/external: not immediately obvious: what is internal to what?

- innate: similar to intrinsic but worse
- acquired: we don't typically think of an op as "acquiring" things
- known/unknown: by who?
- local/global: to what?
- native/foreign: to where?
- advisory: confusing distinction: is the attribute itself advisory or
  is the information it provides advisory?
- essential: an intrinsic attribute need not be present.
- expected: same issue as essential
- unexpected: by who/what?
- closed/open: whether the set is open or closed doesn't seem essential
  to the attribute being intrinsic. Also, in theory an op can have an
  unbounded set of intrinsic attributes (e.g. `arg<N>` for func).
- characteristic: unless you have a math background this probably
  doesn't make as much sense

Differential Revision: https://reviews.llvm.org/D96093


  Commit: b83361b82bfe58cab6069c40b40641d7e39011a9
      https://github.com/llvm/llvm-project/commit/b83361b82bfe58cab6069c40b40641d7e39011a9
  Author: Sean Silva <silvasean at google.com>
  Date:   2021-02-10 (Wed, 10 Feb 2021)

  Changed paths:
    M mlir/docs/OpDefinitions.md

  Log Message:
  -----------
  Minor fixes to Type ODS docs.

Differential Revision: https://reviews.llvm.org/D96391


Compare: https://github.com/llvm/llvm-project/compare/309d40f05228...b83361b82bfe


More information about the All-commits mailing list