Skip to content

Commit 195730a

Browse files
committed
[mlir][NFC] Replace references to Identifier with StringAttr
This is part of the replacement of Identifier with StringAttr. Differential Revision: https://reviews.llvm.org/D113953
1 parent e7568b6 commit 195730a

File tree

85 files changed

+350
-385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+350
-385
lines changed

mlir/docs/DataLayout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ conceptually a collection of key-value pairs called data layout specification
102102
_entries_. Data layout specification attributes implement the
103103
`DataLayoutSpecInterface`, described below. Each entry is itself an attribute
104104
that implements the `DataLayoutEntryInterface`. Entries have a key, either a
105-
`Type` or an `Identifier`, and a value. Keys are used to associate entries with
105+
`Type` or a `StringAttr`, and a value. Keys are used to associate entries with
106106
specific types or dialects: when handling a data layout properties request, a
107107
type or a dialect can only see the specification entries relevant to them and
108108
must go through the supplied `DataLayout` object for any recursive query. This

mlir/docs/Interfaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ operations by overriding the `getRegisteredInterfaceForOp` method :
327327

328328
```c++
329329
void *TestDialect::getRegisteredInterfaceForOp(TypeID typeID,
330-
Identifier opName) {
330+
StringAttr opName) {
331331
if (typeID == TypeID::get<ExampleOpInterface>()) {
332332
if (isSupported(opName))
333333
return fallbackExampleOpInterface;

mlir/docs/Tutorials/DataFlowAnalysis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ struct MetadataLatticeValue {
137137

138138
/// Our value represents the combined metadata, which is originally a
139139
/// DictionaryAttr, so we use a map.
140-
DenseMap<Identifier, Attribute> metadata;
140+
DenseMap<StringAttr, Attribute> metadata;
141141
};
142142
```
143143

mlir/examples/toy/Ch2/mlir/MLIRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class MLIRGenImpl {
9393

9494
/// Helper conversion for a Toy AST location to an MLIR location.
9595
mlir::Location loc(Location loc) {
96-
return mlir::FileLineColLoc::get(builder.getIdentifier(*loc.file), loc.line,
96+
return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
9797
loc.col);
9898
}
9999

mlir/examples/toy/Ch3/mlir/MLIRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class MLIRGenImpl {
9393

9494
/// Helper conversion for a Toy AST location to an MLIR location.
9595
mlir::Location loc(Location loc) {
96-
return mlir::FileLineColLoc::get(builder.getIdentifier(*loc.file), loc.line,
96+
return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
9797
loc.col);
9898
}
9999

mlir/examples/toy/Ch4/mlir/MLIRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class MLIRGenImpl {
9393

9494
/// Helper conversion for a Toy AST location to an MLIR location.
9595
mlir::Location loc(Location loc) {
96-
return mlir::FileLineColLoc::get(builder.getIdentifier(*loc.file), loc.line,
96+
return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
9797
loc.col);
9898
}
9999

mlir/examples/toy/Ch5/mlir/MLIRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class MLIRGenImpl {
9393

9494
/// Helper conversion for a Toy AST location to an MLIR location.
9595
mlir::Location loc(Location loc) {
96-
return mlir::FileLineColLoc::get(builder.getIdentifier(*loc.file), loc.line,
96+
return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
9797
loc.col);
9898
}
9999

mlir/examples/toy/Ch6/mlir/MLIRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class MLIRGenImpl {
9393

9494
/// Helper conversion for a Toy AST location to an MLIR location.
9595
mlir::Location loc(Location loc) {
96-
return mlir::FileLineColLoc::get(builder.getIdentifier(*loc.file), loc.line,
96+
return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
9797
loc.col);
9898
}
9999

mlir/examples/toy/Ch7/mlir/MLIRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class MLIRGenImpl {
113113

114114
/// Helper conversion for a Toy AST location to an MLIR location.
115115
mlir::Location loc(Location loc) {
116-
return mlir::FileLineColLoc::get(builder.getIdentifier(*loc.file), loc.line,
116+
return mlir::FileLineColLoc::get(builder.getStringAttr(*loc.file), loc.line,
117117
loc.col);
118118
}
119119

mlir/include/mlir/CAPI/IR.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include "mlir/CAPI/Wrap.h"
1919
#include "mlir/IR/BuiltinOps.h"
20-
#include "mlir/IR/Identifier.h"
2120
#include "mlir/IR/MLIRContext.h"
2221
#include "mlir/IR/Operation.h"
2322

0 commit comments

Comments
 (0)