summaryrefslogtreecommitdiff
path: root/mlir/lib/Bytecode
diff options
context:
space:
mode:
authorHan-Chung Wang <hanhan0912@gmail.com>2025-03-31 09:29:54 -0700
committerGitHub <noreply@github.com>2025-03-31 09:29:54 -0700
commit66b0b0466bbd995146aadaf2cd18de5476c19941 (patch)
tree51e5cf3befabb6d55d21ebaca8462d9081029217 /mlir/lib/Bytecode
parentc180e249d0013474d502cd779ec65b33cf7e9468 (diff)
[MLIR][NFC] Fix incomplete boundary comments. (#133516)
I observed that we have the boundary comments in the codebase like: ``` //===----------------------------------------------------------------------===// // ... //===----------------------------------------------------------------------===// ``` I also observed that there are incomplete boundary comments. The revision is generated by a script that completes the boundary comments. ``` //===----------------------------------------------------------------------===// // ... ... ``` Signed-off-by: hanhanW <hanhan0912@gmail.com>
Diffstat (limited to 'mlir/lib/Bytecode')
-rw-r--r--mlir/lib/Bytecode/Reader/BytecodeReader.cpp5
-rw-r--r--mlir/lib/Bytecode/Writer/BytecodeWriter.cpp6
2 files changed, 11 insertions, 0 deletions
diff --git a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
index 1204f1c069b1..0f2057cb32ff 100644
--- a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
+++ b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
@@ -1733,6 +1733,7 @@ LogicalResult BytecodeReader::Impl::parseVersion(EncodingReader &reader) {
//===----------------------------------------------------------------------===//
// Dialect Section
+//===----------------------------------------------------------------------===//
LogicalResult BytecodeDialect::load(const DialectReader &reader,
MLIRContext *ctx) {
@@ -1874,6 +1875,7 @@ BytecodeReader::Impl::parseOpName(EncodingReader &reader,
//===----------------------------------------------------------------------===//
// Resource Section
+//===----------------------------------------------------------------------===//
LogicalResult BytecodeReader::Impl::parseResourceSection(
EncodingReader &reader, std::optional<ArrayRef<uint8_t>> resourceData,
@@ -1902,6 +1904,7 @@ LogicalResult BytecodeReader::Impl::parseResourceSection(
//===----------------------------------------------------------------------===//
// UseListOrder Helpers
+//===----------------------------------------------------------------------===//
FailureOr<BytecodeReader::Impl::UseListMapT>
BytecodeReader::Impl::parseUseListOrderForRange(EncodingReader &reader,
@@ -2060,6 +2063,7 @@ LogicalResult BytecodeReader::Impl::processUseLists(Operation *topLevelOp) {
//===----------------------------------------------------------------------===//
// IR Section
+//===----------------------------------------------------------------------===//
LogicalResult
BytecodeReader::Impl::parseIRSection(ArrayRef<uint8_t> sectionData,
@@ -2460,6 +2464,7 @@ LogicalResult BytecodeReader::Impl::parseBlockArguments(EncodingReader &reader,
//===----------------------------------------------------------------------===//
// Value Processing
+//===----------------------------------------------------------------------===//
Value BytecodeReader::Impl::parseOperand(EncodingReader &reader) {
std::vector<Value> &values = valueScopes.back().values;
diff --git a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
index cc5aaed41651..404d361a50c1 100644
--- a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
+++ b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
@@ -772,6 +772,7 @@ LogicalResult BytecodeWriter::write(Operation *rootOp, raw_ostream &os) {
//===----------------------------------------------------------------------===//
// Dialects
+//===----------------------------------------------------------------------===//
/// Write the given entries in contiguous groups with the same parent dialect.
/// Each dialect sub-group is encoded with the parent dialect and number of
@@ -855,6 +856,7 @@ void BytecodeWriter::writeDialectSection(EncodingEmitter &emitter) {
//===----------------------------------------------------------------------===//
// Attributes and Types
+//===----------------------------------------------------------------------===//
void BytecodeWriter::writeAttrTypeSection(EncodingEmitter &emitter) {
EncodingEmitter attrTypeEmitter;
@@ -936,6 +938,7 @@ void BytecodeWriter::writeAttrTypeSection(EncodingEmitter &emitter) {
//===----------------------------------------------------------------------===//
// Operations
+//===----------------------------------------------------------------------===//
LogicalResult BytecodeWriter::writeBlock(EncodingEmitter &emitter,
Block *block) {
@@ -1215,6 +1218,7 @@ LogicalResult BytecodeWriter::writeIRSection(EncodingEmitter &emitter,
//===----------------------------------------------------------------------===//
// Resources
+//===----------------------------------------------------------------------===//
namespace {
/// This class represents a resource builder implementation for the MLIR
@@ -1327,6 +1331,7 @@ void BytecodeWriter::writeResourceSection(Operation *op,
//===----------------------------------------------------------------------===//
// Strings
+//===----------------------------------------------------------------------===//
void BytecodeWriter::writeStringSection(EncodingEmitter &emitter) {
EncodingEmitter stringEmitter;
@@ -1336,6 +1341,7 @@ void BytecodeWriter::writeStringSection(EncodingEmitter &emitter) {
//===----------------------------------------------------------------------===//
// Properties
+//===----------------------------------------------------------------------===//
void BytecodeWriter::writePropertiesSection(EncodingEmitter &emitter) {
EncodingEmitter propertiesEmitter;