Skip to content

Commit

Permalink
Drop Markdown style annotations
Browse files Browse the repository at this point in the history
These come from a non-standard extenion that is not available on Github, so it
only clutters the documentation source with {.mlir} or {.ebnf} tags.

PiperOrigin-RevId: 284733003
  • Loading branch information
ftynse authored and tensorflower-gardener committed Dec 10, 2019
1 parent acb23ff commit ac48733
Show file tree
Hide file tree
Showing 29 changed files with 388 additions and 390 deletions.
22 changes: 11 additions & 11 deletions mlir/g3doc/ConversionToLLVMDialect.md
Expand Up @@ -79,7 +79,7 @@ resulting in a struct containing two pointers + offset.

Examples:

```mlir {.mlir}
```mlir
memref<f32> -> !llvm.type<"{ float*, float*, i64 }">
memref<1 x f32> -> !llvm.type<"{ float*, float*, i64, [1 x i64], [1 x i64] }">
memref<? x f32> -> !llvm.type<"{ float*, float*, i64, [1 x i64], [1 x i64] }">
Expand All @@ -102,7 +102,7 @@ descriptor pointer.

Examples:

```mlir {.mlir}
```mlir
// unranked descriptor
memref<*xf32> -> !llvm.type<"{i64, i8*}">
```
Expand All @@ -125,7 +125,7 @@ converted using these rules.

Examples:

```mlir {.mlir}
```mlir
// zero-ary function type with no results.
() -> ()
// is converted to a zero-ary function with `void` result
Expand Down Expand Up @@ -162,7 +162,7 @@ definition operation uses MLIR syntax.

Examples:

```mlir {.mlir}
```mlir
// zero-ary function type with no results.
func @foo() -> ()
// gets LLVM type void().
Expand Down Expand Up @@ -195,7 +195,7 @@ defines and uses of the values being returned.

Example:

```mlir {.mlir}
```mlir
func @foo(%arg0: i32, %arg1: i64) -> (i32, i64) {
return %arg0, %arg1 : i32, i64
}
Expand Down Expand Up @@ -249,15 +249,15 @@ are used instead of them in the original terminator operation.

Example:

```mlir {.mlir}
```mlir
cond_br %0, ^bb1(%1 : i32), ^bb1(%2 : i32)
^bb1(%3 : i32)
"use"(%3) : (i32) -> ()
```

leads to a new basic block being inserted,

```mlir {.mlir}
```mlir
cond_br %0, ^bb1(%1 : i32), ^dummy
^bb1(%3 : i32):
"use"(%3) : (i32) -> ()
Expand All @@ -267,7 +267,7 @@ leads to a new basic block being inserted,

before the conversion to the LLVM IR dialect:

```mlir {.mlir}
```mlir
llvm.cond_br %0, ^bb1(%1 : !llvm.type<"i32">), ^dummy
^bb1(%3 : !llvm.type<"i32">):
"use"(%3) : (!llvm.type<"i32">) -> ()
Expand Down Expand Up @@ -307,7 +307,7 @@ Examples:

An access to a zero-dimensional memref is converted into a plain load:

```mlir {.mlir}
```mlir
// before
%0 = load %m[] : memref<f32>
Expand All @@ -317,13 +317,13 @@ An access to a zero-dimensional memref is converted into a plain load:

An access to a memref with indices:

```mlir {.mlir}
```mlir
%0 = load %m[1,2,3,4] : memref<10x?x13x?xf32>
```

is transformed into the equivalent of the following code:

```mlir {.mlir}
```mlir
// obtain the buffer pointer
%b = llvm.extractvalue %m[0] : !llvm.type<"{float*, i64, i64}">
Expand Down
12 changes: 6 additions & 6 deletions mlir/g3doc/Diagnostics.md
Expand Up @@ -16,7 +16,7 @@ different location types depending on the situational need.

### CallSite Location

``` {.ebnf}
```
callsite-location ::= 'callsite' '(' location 'at' location ')'
```

Expand All @@ -26,7 +26,7 @@ location usages. This connects a location of a `callee` with the location of a

### FileLineCol Location

``` {.ebnf}
```
filelinecol-location ::= string-literal ':' integer-literal ':' integer-literal
```

Expand All @@ -36,7 +36,7 @@ languages.

### Fused Location

``` {.ebnf}
```
fused-location ::= `fused` fusion-metadata? '[' location (location ',')* ']'
fusion-metadata ::= '<' attribute-value '>'
```
Expand All @@ -49,7 +49,7 @@ loss of location information. With `fused` locations, this is a non-issue.

### Name Location

``` {.ebnf}
```
name-location ::= string-literal ('(' location ')')?
```

Expand All @@ -66,7 +66,7 @@ optional location is used during serialization.

### Unknown Location

``` {.ebnf}
```
unknown-location ::= `unknown`
```

Expand Down Expand Up @@ -311,7 +311,7 @@ annotate your source file with expected diagnostics in the form of:
A few examples are shown below:
```mlir {.mlir}
```mlir
// Expect an error on the same line.
func @bad_branch() {
br ^missing // expected-error {{reference to an undefined block}}
Expand Down

0 comments on commit ac48733

Please sign in to comment.