summaryrefslogtreecommitdiffstats
path: root/mlir/lib/TableGen
diff options
context:
space:
mode:
authorLei Zhang <antiagainst@google.com>2019-06-21 14:51:58 -0700
committerjpienaar <jpienaar@google.com>2019-06-22 09:17:21 -0700
commit8f77d2afedb0ed2f6b84fa5ddcff87c75528c088 (patch)
treefe811bd1316a164b5406aa55115eeab16aee7705 /mlir/lib/TableGen
parent55088075942857843ac490f48af90d65b2191039 (diff)
downloadbcm5719-llvm-8f77d2afedb0ed2f6b84fa5ddcff87c75528c088.tar.gz
bcm5719-llvm-8f77d2afedb0ed2f6b84fa5ddcff87c75528c088.zip
[spirv] Basic serializer and deserializer
This CL adds the basic SPIR-V serializer and deserializer for converting SPIR-V module into the binary format and back. Right now only an empty module with addressing model and memory model is supported; (de)serialize other components will be added gradually with subsequent CLs. The purpose of this library is to enable importing SPIR-V binary modules to run transformations on them and exporting SPIR-V modules to be consumed by execution environments. The focus is transformations, which inevitably means changes to the binary module; so it is not designed to be a general tool for investigating the SPIR-V binary module and does not guarantee roundtrip equivalence (at least for now). PiperOrigin-RevId: 254473019
Diffstat (limited to 'mlir/lib/TableGen')
-rw-r--r--mlir/lib/TableGen/Attribute.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/mlir/lib/TableGen/Attribute.cpp b/mlir/lib/TableGen/Attribute.cpp
index 0bd72ead67c..1107048bb88 100644
--- a/mlir/lib/TableGen/Attribute.cpp
+++ b/mlir/lib/TableGen/Attribute.cpp
@@ -170,6 +170,10 @@ StringRef tblgen::EnumAttr::getUnderlyingType() const {
return def->getValueAsString("underlyingType");
}
+StringRef tblgen::EnumAttr::getUnderlyingToSymbolFnName() const {
+ return def->getValueAsString("underlyingToSymbolFnName");
+}
+
StringRef tblgen::EnumAttr::getStringToSymbolFnName() const {
return def->getValueAsString("stringToSymbolFnName");
}
OpenPOWER on IntegriCloud