diff options
| author | River Riddle <riverriddle@google.com> | 2019-02-19 17:17:46 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 16:32:56 -0700 |
| commit | 48ccae247639bd49bbf8de3330a96f2253e9c417 (patch) | |
| tree | fe248d84799c1d3c04d3ec690dc525c5761c5570 | |
| parent | 5021dc4fa060a7aea1b41148b85162599f1c9713 (diff) | |
| download | bcm5719-llvm-48ccae247639bd49bbf8de3330a96f2253e9c417.tar.gz bcm5719-llvm-48ccae247639bd49bbf8de3330a96f2253e9c417.zip | |
NFC: Refactor the files related to passes.
* PassRegistry is split into its own source file.
* Pass related files are moved to a new library 'Pass'.
PiperOrigin-RevId: 234705771
33 files changed, 188 insertions, 170 deletions
diff --git a/mlir/bindings/python/pybind.cpp b/mlir/bindings/python/pybind.cpp index 7b642924d72..5455eba1350 100644 --- a/mlir/bindings/python/pybind.cpp +++ b/mlir/bindings/python/pybind.cpp @@ -11,7 +11,7 @@ #include "third_party/llvm/llvm/projects/google_mlir/include/mlir/ExecutionEngine/ExecutionEngine.h" #include "third_party/llvm/llvm/projects/google_mlir/include/mlir/IR/BuiltinOps.h" #include "third_party/llvm/llvm/projects/google_mlir/include/mlir/IR/Module.h" -#include "third_party/llvm/llvm/projects/google_mlir/include/mlir/Pass.h" +#include "third_party/llvm/llvm/projects/google_mlir/include/mlir/Pass/Pass.h" #include "third_party/llvm/llvm/projects/google_mlir/include/mlir/Target/LLVMIR.h" #include "third_party/llvm/llvm/projects/google_mlir/include/mlir/Transforms/Passes.h" #include "pybind11/pybind11.h" diff --git a/mlir/include/mlir/Pass.h b/mlir/include/mlir/Pass/Pass.h index d8ab143f3bf..c489dafb20b 100644 --- a/mlir/include/mlir/Pass.h +++ b/mlir/include/mlir/Pass/Pass.h @@ -15,13 +15,10 @@ // limitations under the License. // ============================================================================= -#ifndef MLIR_PASS_H -#define MLIR_PASS_H +#ifndef MLIR_PASS_PASS_H +#define MLIR_PASS_PASS_H -#include "mlir/Support/LLVM.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/Compiler.h" -#include <functional> +#include "mlir/Pass/PassRegistry.h" namespace mlir { class Function; @@ -36,8 +33,6 @@ struct LLVM_NODISCARD PassResult { operator bool() const { return value == Failure; } }; -class PassInfo; - class Pass { public: explicit Pass(const void *passID) : passID(passID) {} @@ -92,66 +87,6 @@ public: // Iterates over all functions in a module, halting upon failure. virtual PassResult runOnModule(Module *m) override; }; - -using PassAllocatorFunction = std::function<Pass *()>; - -/// Structure to group information about a pass (argument to invoke via -/// mlir-opt, description, pass allocator and unique ID). -class PassInfo { -public: - /// PassInfo constructor should not be invoked directly, instead use - /// PassRegistration or registerPass. - PassInfo(StringRef arg, StringRef description, const void *passID, - PassAllocatorFunction allocator) - : arg(arg), description(description), allocator(allocator), - passID(passID) {} - - /// Returns an allocated instance of this pass. - Pass *createPass() const { - assert(allocator && - "Cannot call createPass on PassInfo without default allocator"); - return allocator(); - } - - /// Returns the command line option that may be passed to 'mlir-opt' that will - /// cause this pass to run or null if there is no such argument. - StringRef getPassArgument() const { return arg; } - - /// Returns a description for the pass, this never returns null. - StringRef getPassDescription() const { return description; } - -private: - // The argument with which to invoke the pass via mlir-opt. - StringRef arg; - - // Description of the pass. - StringRef description; - - // Allocator to construct an instance of this pass. - PassAllocatorFunction allocator; - - // Unique identifier for pass. - const void *passID; -}; - -/// Register a specific dialect creation function with the system, typically -/// used through the PassRegistration template. -void registerPass(StringRef arg, StringRef description, const void *passID, - const PassAllocatorFunction &function); - -/// PassRegistration provides a global initializer that registers a Pass -/// allocation routine. -/// -/// Usage: -/// -/// // At namespace scope. -/// static PassRegistration<MyPass> Unused("unused", "Unused pass"); -template <typename ConcretePass> struct PassRegistration { - PassRegistration(StringRef arg, StringRef description) { - registerPass(arg, description, &ConcretePass::passID, - [&]() { return new ConcretePass(); }); - } -}; } // end namespace mlir -#endif // MLIR_PASS_H +#endif // MLIR_PASS_PASS_H diff --git a/mlir/include/mlir/Pass/PassRegistry.h b/mlir/include/mlir/Pass/PassRegistry.h new file mode 100644 index 00000000000..8f324bf0f69 --- /dev/null +++ b/mlir/include/mlir/Pass/PassRegistry.h @@ -0,0 +1,104 @@ +//===- PassRegistry.h - Pass Registration Utilities -------------*- C++ -*-===// +// +// Copyright 2019 The MLIR Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================= +// +// This file contains utilities for registering information about compiler +// passes. +// +//===----------------------------------------------------------------------===// + +#ifndef MLIR_PASS_PASSREGISTRY_H_ +#define MLIR_PASS_PASSREGISTRY_H_ + +#include "mlir/Support/LLVM.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Compiler.h" +#include <functional> + +namespace mlir { +class Pass; + +using PassAllocatorFunction = std::function<Pass *()>; + +/// Structure to group information about a pass (argument to invoke via +/// mlir-opt, description, pass allocator and unique ID). +class PassInfo { +public: + /// PassInfo constructor should not be invoked directly, instead use + /// PassRegistration or registerPass. + PassInfo(StringRef arg, StringRef description, const void *passID, + PassAllocatorFunction allocator) + : arg(arg), description(description), allocator(allocator), + passID(passID) {} + + /// Returns an allocated instance of this pass. + Pass *createPass() const { + assert(allocator && + "Cannot call createPass on PassInfo without default allocator"); + return allocator(); + } + + /// Returns the command line option that may be passed to 'mlir-opt' that will + /// cause this pass to run or null if there is no such argument. + StringRef getPassArgument() const { return arg; } + + /// Returns a description for the pass, this never returns null. + StringRef getPassDescription() const { return description; } + +private: + // The argument with which to invoke the pass via mlir-opt. + StringRef arg; + + // Description of the pass. + StringRef description; + + // Allocator to construct an instance of this pass. + PassAllocatorFunction allocator; + + // Unique identifier for pass. + const void *passID; +}; + +/// Register a specific dialect creation function with the system, typically +/// used through the PassRegistration template. +void registerPass(StringRef arg, StringRef description, const void *passID, + const PassAllocatorFunction &function); + +/// PassRegistration provides a global initializer that registers a Pass +/// allocation routine. +/// +/// Usage: +/// +/// // At namespace scope. +/// static PassRegistration<MyPass> Unused("unused", "Unused pass"); +template <typename ConcretePass> struct PassRegistration { + PassRegistration(StringRef arg, StringRef description) { + registerPass(arg, description, &ConcretePass::passID, + [&]() { return new ConcretePass(); }); + } +}; + +/// Adds command line option for each registered pass. +struct PassNameParser : public llvm::cl::parser<const PassInfo *> { + PassNameParser(llvm::cl::Option &opt); + + void printOptionInfo(const llvm::cl::Option &O, + size_t GlobalWidth) const override; +}; +} // end namespace mlir + +#endif // MLIR_PASS_PASSREGISTRY_H_ diff --git a/mlir/include/mlir/Support/PassNameParser.h b/mlir/include/mlir/Support/PassNameParser.h deleted file mode 100644 index bbdf433b9ab..00000000000 --- a/mlir/include/mlir/Support/PassNameParser.h +++ /dev/null @@ -1,40 +0,0 @@ -//===- PassNameParser.h - Base classes for compiler passes ------*- C++ -*-===// -// -// Copyright 2019 The MLIR Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ============================================================================= -// -// The PassNameParser class adds all passes linked in to the system that are -// creatable to the tool. -// -//===----------------------------------------------------------------------===// - -#ifndef MLIR_SUPPORT_PASSNAMEPARSER_H_ -#define MLIR_SUPPORT_PASSNAMEPARSER_H_ - -#include "llvm/Support/CommandLine.h" - -namespace mlir { -class PassInfo; - -/// Adds command line option for each registered pass. -struct PassNameParser : public llvm::cl::parser<const PassInfo *> { - PassNameParser(llvm::cl::Option &opt); - - void printOptionInfo(const llvm::cl::Option &O, - size_t GlobalWidth) const override; -}; -} // end namespace mlir - -#endif // MLIR_SUPPORT_PASSNAMEPARSER_H_ diff --git a/mlir/include/mlir/Transforms/DialectConversion.h b/mlir/include/mlir/Transforms/DialectConversion.h index 7bd08bbd766..b547e21c28a 100644 --- a/mlir/include/mlir/Transforms/DialectConversion.h +++ b/mlir/include/mlir/Transforms/DialectConversion.h @@ -23,7 +23,7 @@ #define MLIR_TRANSFORMS_DIALECTCONVERSION_H_ #include "mlir/IR/PatternMatch.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Support/LLVM.h" namespace mlir { diff --git a/mlir/include/mlir/Transforms/MLPatternLoweringPass.h b/mlir/include/mlir/Transforms/MLPatternLoweringPass.h index c5be3322f43..1abd85a1d2b 100644 --- a/mlir/include/mlir/Transforms/MLPatternLoweringPass.h +++ b/mlir/include/mlir/Transforms/MLPatternLoweringPass.h @@ -24,7 +24,7 @@ #define MLIR_TRANSFORMS_MLPATTERNLOWERINGPASS_H #include "mlir/IR/PatternMatch.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include <type_traits> namespace mlir { diff --git a/mlir/lib/Analysis/MemRefBoundCheck.cpp b/mlir/lib/Analysis/MemRefBoundCheck.cpp index 3482f24dfcc..9f6efff3187 100644 --- a/mlir/lib/Analysis/MemRefBoundCheck.cpp +++ b/mlir/lib/Analysis/MemRefBoundCheck.cpp @@ -26,7 +26,7 @@ #include "mlir/IR/AffineStructures.h" #include "mlir/IR/Builders.h" #include "mlir/IR/BuiltinOps.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "llvm/Support/Debug.h" diff --git a/mlir/lib/Analysis/MemRefDependenceCheck.cpp b/mlir/lib/Analysis/MemRefDependenceCheck.cpp index 578121e546e..43bc0c98916 100644 --- a/mlir/lib/Analysis/MemRefDependenceCheck.cpp +++ b/mlir/lib/Analysis/MemRefDependenceCheck.cpp @@ -25,7 +25,7 @@ #include "mlir/IR/AffineStructures.h" #include "mlir/IR/Builders.h" #include "mlir/IR/BuiltinOps.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "llvm/Support/Debug.h" diff --git a/mlir/lib/Analysis/OpStats.cpp b/mlir/lib/Analysis/OpStats.cpp index f05f8737b16..6ae7ec59c50 100644 --- a/mlir/lib/Analysis/OpStats.cpp +++ b/mlir/lib/Analysis/OpStats.cpp @@ -18,7 +18,7 @@ #include "mlir/IR/Instruction.h" #include "mlir/IR/Module.h" #include "mlir/IR/OperationSupport.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "llvm/ADT/DenseMap.h" #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" diff --git a/mlir/lib/EDSC/LowerEDSCTestPass.cpp b/mlir/lib/EDSC/LowerEDSCTestPass.cpp index 073113a342a..25fdadd397d 100644 --- a/mlir/lib/EDSC/LowerEDSCTestPass.cpp +++ b/mlir/lib/EDSC/LowerEDSCTestPass.cpp @@ -23,7 +23,7 @@ #include "mlir/IR/Module.h" #include "mlir/IR/StandardTypes.h" #include "mlir/IR/Types.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "llvm/Support/raw_ostream.h" diff --git a/mlir/lib/ExecutionEngine/ExecutionEngine.cpp b/mlir/lib/ExecutionEngine/ExecutionEngine.cpp index b8ca360756b..01278aad8af 100644 --- a/mlir/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/mlir/lib/ExecutionEngine/ExecutionEngine.cpp @@ -22,7 +22,7 @@ #include "mlir/ExecutionEngine/ExecutionEngine.h" #include "mlir/IR/Function.h" #include "mlir/IR/Module.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Target/LLVMIR.h" #include "mlir/Transforms/Passes.h" diff --git a/mlir/lib/LLVMIR/Transforms/ConvertToLLVMDialect.cpp b/mlir/lib/LLVMIR/Transforms/ConvertToLLVMDialect.cpp index e72840695dc..71c335082ff 100644 --- a/mlir/lib/LLVMIR/Transforms/ConvertToLLVMDialect.cpp +++ b/mlir/lib/LLVMIR/Transforms/ConvertToLLVMDialect.cpp @@ -26,7 +26,7 @@ #include "mlir/IR/Module.h" #include "mlir/IR/PatternMatch.h" #include "mlir/LLVMIR/LLVMDialect.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "mlir/Support/Functional.h" #include "mlir/Transforms/DialectConversion.h" diff --git a/mlir/lib/Pass/Pass.cpp b/mlir/lib/Pass/Pass.cpp new file mode 100644 index 00000000000..6a41cafcf1e --- /dev/null +++ b/mlir/lib/Pass/Pass.cpp @@ -0,0 +1,47 @@ +//===- Pass.cpp - Pass infrastructure implementation ----------------------===// +// +// Copyright 2019 The MLIR Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================= +// +// This file implements common pass infrastructure. +// +//===----------------------------------------------------------------------===// + +#include "mlir/Pass/Pass.h" +#include "mlir/IR/Module.h" + +using namespace mlir; + +/// Out of line virtual method to ensure vtables and metadata are emitted to a +/// single .o file. +void Pass::anchor() {} + +/// Out of line virtual method to ensure vtables and metadata are emitted to a +/// single .o file. +void ModulePass::anchor() {} + +/// Function passes walk a module and look at each function with their +/// corresponding hooks and terminates upon error encountered. +PassResult FunctionPass::runOnModule(Module *m) { + for (auto &fn : *m) { + // All function passes ignore external functions. + if (fn.empty()) + continue; + + if (runOnFunction(&fn)) + return failure(); + } + return success(); +} diff --git a/mlir/lib/Analysis/Pass.cpp b/mlir/lib/Pass/PassRegistry.cpp index a10fe0324d5..c26da1f4099 100644 --- a/mlir/lib/Analysis/Pass.cpp +++ b/mlir/lib/Pass/PassRegistry.cpp @@ -1,4 +1,4 @@ -//===- Pass.cpp - Pass infrastructure implementation ----------------------===// +//===- PassRegistry.cpp - Pass Registration Utilities ---------------------===// // // Copyright 2019 The MLIR Authors. // @@ -14,42 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. // ============================================================================= -// -// This file implements common pass infrastructure. -// -//===----------------------------------------------------------------------===// -#include "mlir/Pass.h" -#include "mlir/IR/Function.h" -#include "mlir/IR/Module.h" -#include "mlir/Support/PassNameParser.h" +#include "mlir/Pass/PassRegistry.h" +#include "mlir/Pass/Pass.h" #include "llvm/ADT/DenseMap.h" #include "llvm/Support/ManagedStatic.h" -using namespace mlir; - -/// Out of line virtual method to ensure vtables and metadata are emitted to a -/// single .o file. -void Pass::anchor() {} - -/// Out of line virtual method to ensure vtables and metadata are emitted to a -/// single .o file. -void ModulePass::anchor() {} -/// Function passes walk a module and look at each function with their -/// corresponding hooks and terminates upon error encountered. -PassResult FunctionPass::runOnModule(Module *m) { - for (auto &fn : *m) { - // All function passes ignore external functions. - if (fn.empty()) - continue; - - if (runOnFunction(&fn)) - return failure(); - } - return success(); -} +using namespace mlir; -// TODO: The pass registry and pass name parsing should be moved out. +/// Static mapping of all of the registered passes. static llvm::ManagedStatic<llvm::DenseMap<const void *, PassInfo>> passRegistry; void mlir::registerPass(StringRef arg, StringRef description, diff --git a/mlir/lib/Transforms/CSE.cpp b/mlir/lib/Transforms/CSE.cpp index de10fe8a461..cd205fe773b 100644 --- a/mlir/lib/Transforms/CSE.cpp +++ b/mlir/lib/Transforms/CSE.cpp @@ -24,7 +24,7 @@ #include "mlir/IR/Attributes.h" #include "mlir/IR/Builders.h" #include "mlir/IR/Function.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Support/Functional.h" #include "mlir/Transforms/Passes.h" #include "mlir/Transforms/Utils.h" diff --git a/mlir/lib/Transforms/Canonicalizer.cpp b/mlir/lib/Transforms/Canonicalizer.cpp index e6d32e02e58..0388744d4d2 100644 --- a/mlir/lib/Transforms/Canonicalizer.cpp +++ b/mlir/lib/Transforms/Canonicalizer.cpp @@ -22,7 +22,7 @@ #include "mlir/IR/MLIRContext.h" #include "mlir/IR/PatternMatch.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Transforms/Passes.h" using namespace mlir; diff --git a/mlir/lib/Transforms/ConstantFold.cpp b/mlir/lib/Transforms/ConstantFold.cpp index 51ec123d658..7634d9ec16a 100644 --- a/mlir/lib/Transforms/ConstantFold.cpp +++ b/mlir/lib/Transforms/ConstantFold.cpp @@ -18,7 +18,7 @@ #include "mlir/AffineOps/AffineOps.h" #include "mlir/IR/Builders.h" #include "mlir/IR/Function.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Transforms/Passes.h" #include "mlir/Transforms/Utils.h" diff --git a/mlir/lib/Transforms/DmaGeneration.cpp b/mlir/lib/Transforms/DmaGeneration.cpp index cafb9ba4d70..fb5719aca02 100644 --- a/mlir/lib/Transforms/DmaGeneration.cpp +++ b/mlir/lib/Transforms/DmaGeneration.cpp @@ -26,7 +26,7 @@ #include "mlir/IR/AffineStructures.h" #include "mlir/IR/Builders.h" #include "mlir/IR/BuiltinOps.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "mlir/Transforms/Passes.h" #include "mlir/Transforms/Utils.h" diff --git a/mlir/lib/Transforms/LoopFusion.cpp b/mlir/lib/Transforms/LoopFusion.cpp index aebf2716c4e..63a681a4fdc 100644 --- a/mlir/lib/Transforms/LoopFusion.cpp +++ b/mlir/lib/Transforms/LoopFusion.cpp @@ -28,7 +28,7 @@ #include "mlir/IR/AffineStructures.h" #include "mlir/IR/Builders.h" #include "mlir/IR/BuiltinOps.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "mlir/Transforms/LoopUtils.h" #include "mlir/Transforms/Passes.h" diff --git a/mlir/lib/Transforms/LoopTiling.cpp b/mlir/lib/Transforms/LoopTiling.cpp index 44798dcee85..76e8e9254c9 100644 --- a/mlir/lib/Transforms/LoopTiling.cpp +++ b/mlir/lib/Transforms/LoopTiling.cpp @@ -24,7 +24,7 @@ #include "mlir/Analysis/LoopAnalysis.h" #include "mlir/IR/AffineStructures.h" #include "mlir/IR/Builders.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Transforms/LoopUtils.h" #include "mlir/Transforms/Passes.h" #include "mlir/Transforms/Utils.h" diff --git a/mlir/lib/Transforms/LoopUnroll.cpp b/mlir/lib/Transforms/LoopUnroll.cpp index 84b0d2279db..b452b4f76e2 100644 --- a/mlir/lib/Transforms/LoopUnroll.cpp +++ b/mlir/lib/Transforms/LoopUnroll.cpp @@ -27,7 +27,7 @@ #include "mlir/IR/AffineMap.h" #include "mlir/IR/Builders.h" #include "mlir/IR/BuiltinOps.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Transforms/LoopUtils.h" #include "llvm/ADT/DenseMap.h" #include "llvm/Support/CommandLine.h" diff --git a/mlir/lib/Transforms/LoopUnrollAndJam.cpp b/mlir/lib/Transforms/LoopUnrollAndJam.cpp index b2aed7d9d7f..76668c7f0b5 100644 --- a/mlir/lib/Transforms/LoopUnrollAndJam.cpp +++ b/mlir/lib/Transforms/LoopUnrollAndJam.cpp @@ -50,7 +50,7 @@ #include "mlir/IR/BlockAndValueMapping.h" #include "mlir/IR/Builders.h" #include "mlir/IR/BuiltinOps.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Transforms/LoopUtils.h" #include "llvm/ADT/DenseMap.h" #include "llvm/Support/CommandLine.h" diff --git a/mlir/lib/Transforms/LowerAffine.cpp b/mlir/lib/Transforms/LowerAffine.cpp index 0d8eb8a4761..8b62601ab41 100644 --- a/mlir/lib/Transforms/LowerAffine.cpp +++ b/mlir/lib/Transforms/LowerAffine.cpp @@ -26,7 +26,7 @@ #include "mlir/IR/BuiltinOps.h" #include "mlir/IR/IntegerSet.h" #include "mlir/IR/MLIRContext.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "mlir/Support/Functional.h" #include "mlir/Transforms/Passes.h" diff --git a/mlir/lib/Transforms/LowerVectorTransfers.cpp b/mlir/lib/Transforms/LowerVectorTransfers.cpp index ff97e9197f3..bd43a637665 100644 --- a/mlir/lib/Transforms/LowerVectorTransfers.cpp +++ b/mlir/lib/Transforms/LowerVectorTransfers.cpp @@ -36,7 +36,7 @@ #include "mlir/IR/OperationSupport.h" #include "mlir/IR/PatternMatch.h" #include "mlir/IR/Types.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "mlir/SuperVectorOps/SuperVectorOps.h" #include "mlir/Support/Functional.h" diff --git a/mlir/lib/Transforms/MaterializeVectors.cpp b/mlir/lib/Transforms/MaterializeVectors.cpp index 6c7820fced9..3cd33c20fae 100644 --- a/mlir/lib/Transforms/MaterializeVectors.cpp +++ b/mlir/lib/Transforms/MaterializeVectors.cpp @@ -36,7 +36,7 @@ #include "mlir/IR/Location.h" #include "mlir/IR/OperationSupport.h" #include "mlir/IR/Types.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "mlir/SuperVectorOps/SuperVectorOps.h" #include "mlir/Support/Functional.h" diff --git a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp index d9f940a01f3..68bce854222 100644 --- a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp +++ b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp @@ -25,7 +25,7 @@ #include "mlir/Analysis/AffineAnalysis.h" #include "mlir/Analysis/Dominance.h" #include "mlir/Analysis/Utils.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "mlir/Transforms/Passes.h" #include "llvm/ADT/SmallPtrSet.h" diff --git a/mlir/lib/Transforms/PipelineDataTransfer.cpp b/mlir/lib/Transforms/PipelineDataTransfer.cpp index a85f428bde6..b6bfde58494 100644 --- a/mlir/lib/Transforms/PipelineDataTransfer.cpp +++ b/mlir/lib/Transforms/PipelineDataTransfer.cpp @@ -26,7 +26,7 @@ #include "mlir/Analysis/LoopAnalysis.h" #include "mlir/Analysis/Utils.h" #include "mlir/IR/Builders.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "mlir/Transforms/LoopUtils.h" #include "mlir/Transforms/Utils.h" diff --git a/mlir/lib/Transforms/SimplifyAffineStructures.cpp b/mlir/lib/Transforms/SimplifyAffineStructures.cpp index 897498e8346..20961180b83 100644 --- a/mlir/lib/Transforms/SimplifyAffineStructures.cpp +++ b/mlir/lib/Transforms/SimplifyAffineStructures.cpp @@ -23,7 +23,7 @@ #include "mlir/IR/Function.h" #include "mlir/IR/Instruction.h" #include "mlir/IR/IntegerSet.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Transforms/Passes.h" #define DEBUG_TYPE "simplify-affine-structure" diff --git a/mlir/lib/Transforms/StripDebugInfo.cpp b/mlir/lib/Transforms/StripDebugInfo.cpp index c5e42b622ed..2eb4a37445c 100644 --- a/mlir/lib/Transforms/StripDebugInfo.cpp +++ b/mlir/lib/Transforms/StripDebugInfo.cpp @@ -17,7 +17,7 @@ #include "mlir/IR/Function.h" #include "mlir/IR/Instruction.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Transforms/Passes.h" using namespace mlir; diff --git a/mlir/lib/Transforms/Vectorization/VectorizerTestPass.cpp b/mlir/lib/Transforms/Vectorization/VectorizerTestPass.cpp index 1a83fce2eeb..3fa08bba096 100644 --- a/mlir/lib/Transforms/Vectorization/VectorizerTestPass.cpp +++ b/mlir/lib/Transforms/Vectorization/VectorizerTestPass.cpp @@ -27,7 +27,7 @@ #include "mlir/IR/Builders.h" #include "mlir/IR/BuiltinOps.h" #include "mlir/IR/StandardTypes.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Support/Functional.h" #include "mlir/Support/STLExtras.h" #include "mlir/Transforms/Passes.h" diff --git a/mlir/lib/Transforms/Vectorize.cpp b/mlir/lib/Transforms/Vectorize.cpp index 5a8d5d24661..40a2c9794ae 100644 --- a/mlir/lib/Transforms/Vectorize.cpp +++ b/mlir/lib/Transforms/Vectorize.cpp @@ -29,7 +29,7 @@ #include "mlir/IR/BuiltinOps.h" #include "mlir/IR/Location.h" #include "mlir/IR/Types.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/StandardOps/StandardOps.h" #include "mlir/SuperVectorOps/SuperVectorOps.h" #include "mlir/Support/Functional.h" diff --git a/mlir/lib/Transforms/ViewFunctionGraph.cpp b/mlir/lib/Transforms/ViewFunctionGraph.cpp index e46dc503ea9..4865859b9ec 100644 --- a/mlir/lib/Transforms/ViewFunctionGraph.cpp +++ b/mlir/lib/Transforms/ViewFunctionGraph.cpp @@ -17,7 +17,7 @@ #include "mlir/Transforms/ViewFunctionGraph.h" #include "mlir/IR/FunctionGraphTraits.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" using namespace mlir; diff --git a/mlir/tools/mlir-opt/mlir-opt.cpp b/mlir/tools/mlir-opt/mlir-opt.cpp index 12593a8cae5..4c0c8fdc296 100644 --- a/mlir/tools/mlir-opt/mlir-opt.cpp +++ b/mlir/tools/mlir-opt/mlir-opt.cpp @@ -28,9 +28,8 @@ #include "mlir/IR/MLIRContext.h" #include "mlir/IR/Module.h" #include "mlir/Parser.h" -#include "mlir/Pass.h" +#include "mlir/Pass/Pass.h" #include "mlir/Support/FileUtilities.h" -#include "mlir/Support/PassNameParser.h" #include "mlir/TensorFlow/ControlFlowOps.h" #include "mlir/TensorFlow/Passes.h" #include "mlir/TensorFlowLite/Passes.h" |

