[Mlir-commits] [mlir] [mlir] Remove bytecode reader & writer header from interface. (PR #98920)

Jacques Pienaar llvmlistbot at llvm.org
Mon Jul 15 09:02:59 PDT 2024


https://github.com/jpienaar created https://github.com/llvm/llvm-project/pull/98920

Flagged some additional headers missing in process.

Inspired by #98676

>From b141800a7fb45cebf3165d1656c759292889d529 Mon Sep 17 00:00:00 2001
From: Jacques Pienaar <jpienaar at google.com>
Date: Sat, 13 Jul 2024 04:00:31 +0000
Subject: [PATCH] [mlir] Remove bytecode reader & writer header from interface.

Flagged some additional headers missing in process.

Inspired by #98676
---
 mlir/include/mlir/Bytecode/BytecodeOpInterface.h  | 2 --
 mlir/include/mlir/Bytecode/BytecodeReaderConfig.h | 4 ++--
 mlir/lib/Bytecode/Writer/IRNumbering.cpp          | 1 +
 mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp      | 1 +
 mlir/lib/Target/LLVMIR/DebugImporter.h            | 1 +
 5 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/mlir/include/mlir/Bytecode/BytecodeOpInterface.h b/mlir/include/mlir/Bytecode/BytecodeOpInterface.h
index c9c60608fa5b9..98f1fee7f9d3a 100644
--- a/mlir/include/mlir/Bytecode/BytecodeOpInterface.h
+++ b/mlir/include/mlir/Bytecode/BytecodeOpInterface.h
@@ -15,8 +15,6 @@
 #define MLIR_BYTECODE_BYTECODEOPINTERFACE_H
 
 #include "mlir/Bytecode/BytecodeImplementation.h"
-#include "mlir/Bytecode/BytecodeReader.h"
-#include "mlir/Bytecode/BytecodeWriter.h"
 #include "mlir/IR/OpDefinition.h"
 
 /// Include the generated interface declarations.
diff --git a/mlir/include/mlir/Bytecode/BytecodeReaderConfig.h b/mlir/include/mlir/Bytecode/BytecodeReaderConfig.h
index 47be732fa3880..c473b5779130f 100644
--- a/mlir/include/mlir/Bytecode/BytecodeReaderConfig.h
+++ b/mlir/include/mlir/Bytecode/BytecodeReaderConfig.h
@@ -1,4 +1,4 @@
-//===- BytecodeReader.h - MLIR Bytecode Reader ------------------*- C++ -*-===//
+//===- BytecodeReaderConfig.h - MLIR Bytecode Reader Config -----*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This header defines interfaces to read MLIR bytecode files/streams.
+// This header config for reading MLIR bytecode files/streams.
 //
 //===----------------------------------------------------------------------===//
 
diff --git a/mlir/lib/Bytecode/Writer/IRNumbering.cpp b/mlir/lib/Bytecode/Writer/IRNumbering.cpp
index d2144dd7f3348..1bc02e1721573 100644
--- a/mlir/lib/Bytecode/Writer/IRNumbering.cpp
+++ b/mlir/lib/Bytecode/Writer/IRNumbering.cpp
@@ -9,6 +9,7 @@
 #include "IRNumbering.h"
 #include "mlir/Bytecode/BytecodeImplementation.h"
 #include "mlir/Bytecode/BytecodeOpInterface.h"
+#include "mlir/Bytecode/BytecodeWriter.h"
 #include "mlir/Bytecode/Encoding.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
index a7a0af231af33..f5ec5a476ad8f 100644
--- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -33,6 +33,7 @@
 #include <cstddef>
 #include <iterator>
 #include <optional>
+#include <variant>
 
 #include "mlir/Dialect/OpenMP/OpenMPOpsDialect.cpp.inc"
 #include "mlir/Dialect/OpenMP/OpenMPOpsEnums.cpp.inc"
diff --git a/mlir/lib/Target/LLVMIR/DebugImporter.h b/mlir/lib/Target/LLVMIR/DebugImporter.h
index 4a2bf35c160e1..0e040891ba6c0 100644
--- a/mlir/lib/Target/LLVMIR/DebugImporter.h
+++ b/mlir/lib/Target/LLVMIR/DebugImporter.h
@@ -18,6 +18,7 @@
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/MLIRContext.h"
 #include "mlir/Support/CyclicReplacerCache.h"
+#include "llvm/ADT/MapVector.h"
 #include "llvm/IR/DebugInfoMetadata.h"
 
 namespace mlir {



More information about the Mlir-commits mailing list