summaryrefslogtreecommitdiffstats
path: root/mlir/lib
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-03-05 14:42:55 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 16:58:20 -0700
commit73e0297d36452555cb9552827c498c8bde1a5f74 (patch)
treea9fdb9bb38b59cc202437b769cf991a05092f98d /mlir/lib
parent7b0b344c5efe3d262009fbd06817e77c5449bbd2 (diff)
downloadbcm5719-llvm-73e0297d36452555cb9552827c498c8bde1a5f74.tar.gz
bcm5719-llvm-73e0297d36452555cb9552827c498c8bde1a5f74.zip
Change the TensorFlow attribute prefix from "tf$" to "tf." to match the specification of dialect attributes. This also fixes tblgen generation of dialect attributes that used the sugared name "tf$attr" as c++ identifiers.
PiperOrigin-RevId: 236924392
Diffstat (limited to 'mlir/lib')
-rw-r--r--mlir/lib/Analysis/Verifier.cpp8
-rw-r--r--mlir/lib/TableGen/Argument.cpp2
2 files changed, 3 insertions, 7 deletions
diff --git a/mlir/lib/Analysis/Verifier.cpp b/mlir/lib/Analysis/Verifier.cpp
index 095d3276650..81e388aa296 100644
--- a/mlir/lib/Analysis/Verifier.cpp
+++ b/mlir/lib/Analysis/Verifier.cpp
@@ -145,12 +145,8 @@ bool FuncVerifier::verify() {
/// Check that the attribute is a dialect attribute, i.e. contains a '.' for
/// the namespace.
- if (!attr.first.strref().contains('.')) {
- // TODO: Remove the remaining usages of non dialect attributes on
- // functions and then enable this check.
- // return failure("functions may only have dialect attributes", fn);
- continue;
- }
+ if (!attr.first.strref().contains('.'))
+ return failure("functions may only have dialect attributes", fn);
// Verify this attribute with the defining dialect.
if (auto *dialect = getDialectForAttribute(attr, fn))
diff --git a/mlir/lib/TableGen/Argument.cpp b/mlir/lib/TableGen/Argument.cpp
index bd6d6ef7095..572df790b2a 100644
--- a/mlir/lib/TableGen/Argument.cpp
+++ b/mlir/lib/TableGen/Argument.cpp
@@ -26,7 +26,7 @@ std::string tblgen::NamedAttribute::getName() const {
auto split = name.split("__");
if (split.second.empty())
return name;
- return llvm::join_items("$", split.first, split.second);
+ return llvm::join_items(".", split.first, split.second);
}
bool tblgen::Value::hasPredicate() const {
OpenPOWER on IntegriCloud