10 changes: 5 additions & 5 deletions mlir/examples/transform-opt/mlir-transform-opt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class DiagnosticHandlerWrapper {
DiagnosticHandlerWrapper &operator=(DiagnosticHandlerWrapper &&) = default;

/// Verifies the captured "expected-*" diagnostics if required.
mlir::LogicalResult verify() const {
llvm::LogicalResult verify() const {
if (auto *ptr =
handler.dyn_cast<mlir::SourceMgrDiagnosticVerifierHandler *>()) {
return ptr->verify();
Expand Down Expand Up @@ -192,7 +192,7 @@ class TransformSourceMgr {
/// If diagnostic message verification has been requested upon construction of
/// this source manager, performs the verification, reports errors and returns
/// the result of the verification. Otherwise passes through the given value.
mlir::LogicalResult checkResult(mlir::LogicalResult result) {
llvm::LogicalResult checkResult(llvm::LogicalResult result) {
resultChecked = true;
if (!verifyDiagnostics)
return result;
Expand Down Expand Up @@ -222,7 +222,7 @@ class TransformSourceMgr {

/// Trivial wrapper around `applyTransforms` that doesn't support extra mapping
/// and doesn't enforce the entry point transform ops being top-level.
static mlir::LogicalResult
static llvm::LogicalResult
applyTransforms(mlir::Operation *payloadRoot,
mlir::transform::TransformOpInterface transformRoot,
const mlir::transform::TransformOptions &options) {
Expand All @@ -237,7 +237,7 @@ applyTransforms(mlir::Operation *payloadRoot,
/// application is successful, prints the transformed input buffer into the
/// given output stream. Additional configuration options are derived from
/// command-line options.
static mlir::LogicalResult processPayloadBuffer(
static llvm::LogicalResult processPayloadBuffer(
raw_ostream &os, std::unique_ptr<MemoryBuffer> inputBuffer,
std::unique_ptr<llvm::MemoryBuffer> transformBuffer,
MutableArrayRef<std::unique_ptr<MemoryBuffer>> transformLibraries,
Expand Down Expand Up @@ -309,7 +309,7 @@ static mlir::LogicalResult processPayloadBuffer(
}

/// Tool entry point.
static mlir::LogicalResult runMain(int argc, char **argv) {
static llvm::LogicalResult runMain(int argc, char **argv) {
// Register all upstream dialects and extensions. Specific uses are advised
// not to register all dialects indiscriminately but rather hand-pick what is
// necessary for their use case.
Expand Down
2 changes: 1 addition & 1 deletion mlir/examples/transform/Ch4/lib/MyExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void mlir::transform::HasOperandSatisfyingOp::getEffects(

// Verify well-formedness of the operation and emit diagnostics if it is
// ill-formed.
mlir::LogicalResult mlir::transform::HasOperandSatisfyingOp::verify() {
llvm::LogicalResult mlir::transform::HasOperandSatisfyingOp::verify() {
mlir::Block &bodyBlock = getBody().front();
if (bodyBlock.getNumArguments() != 1 ||
!isa<TransformValueHandleTypeInterface>(
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Analysis/FlatLinearValueConstraints.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "mlir/Analysis/Presburger/Matrix.h"
#include "mlir/IR/AffineExpr.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/Support/LogicalResult.h"
#include <optional>

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Bytecode/BytecodeImplementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/Dialect.h"
#include "mlir/IR/DialectInterface.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Twine.h"

Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Bytecode/BytecodeOpInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mlir/Bytecode/BytecodeReader.h"
#include "mlir/Bytecode/BytecodeWriter.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/Support/LogicalResult.h"

/// Include the generated interface declarations.
#include "mlir/Bytecode/BytecodeOpInterface.h.inc"
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Bytecode/BytecodeReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include "mlir/IR/AsmState.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include <functional>
#include <memory>

Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Bytecode/BytecodeReaderConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#define MLIR_BYTECODE_BYTECODEREADERCONFIG_H

#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
Expand Down
6 changes: 3 additions & 3 deletions mlir/include/mlir/CAPI/Support.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

#include "mlir-c/Support.h"
#include "mlir/CAPI/Wrap.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/TypeID.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/LogicalResult.h"

namespace llvm {
class ThreadPoolInterface;
Expand All @@ -35,13 +35,13 @@ inline llvm::StringRef unwrap(MlirStringRef ref) {
return llvm::StringRef(ref.data, ref.length);
}

inline MlirLogicalResult wrap(mlir::LogicalResult res) {
inline MlirLogicalResult wrap(llvm::LogicalResult res) {
if (mlir::succeeded(res))
return mlirLogicalResultSuccess();
return mlirLogicalResultFailure();
}

inline mlir::LogicalResult unwrap(MlirLogicalResult res) {
inline llvm::LogicalResult unwrap(MlirLogicalResult res) {
return mlir::success(mlirLogicalResultIsSuccess(res));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

namespace mlir {
class Location;
struct LogicalResult;
class OpBuilder;
class Pass;
class RewritePattern;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "mlir/IR/DialectInterface.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/Support/LogicalResult.h"

namespace mlir {
class ConversionTarget;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#define MLIR_CONVERSION_FUNCTOLLVM_CONVERTFUNCTOLLVM_H

#include "mlir/Interfaces/FunctionInterfaces.h"
#include "mlir/Support/LogicalResult.h"

namespace mlir {

Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Conversion/GPUCommon/GPUCommonPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ namespace mlir {

class LLVMTypeConverter;
class Location;
struct LogicalResult;
class ModuleOp;
class Operation;
class RewritePatternSet;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

namespace mlir {
class ConversionTarget;
struct LogicalResult;
class MLIRContext;
class Value;
class Operation;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "mlir/IR/PatternMatch.h"

namespace mlir {
struct LogicalResult;
class MLIRContext;
class Pass;
class RewritePatternSet;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Debug/CLOptionsSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define MLIR_DEBUG_CLOPTIONSSETUP_H

#include "mlir/Debug/BreakpointManagers/FileLineColLocBreakpointManager.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/StringRef.h"

#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Dialect/AMDGPU/Utils/Chipset.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef MLIR_DIALECT_AMDGPU_UTILS_CHIPSET_H_
#define MLIR_DIALECT_AMDGPU_UTILS_CHIPSET_H_

#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/LLVM.h"

namespace mlir {
namespace amdgpu {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mlir/Analysis/Presburger/Matrix.h"
#include "mlir/IR/AffineExpr.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/Support/LogicalResult.h"
#include <optional>

namespace mlir {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef MLIR_DIALECT_AFFINE_IR_VALUEBOUNDSOPINTERFACEIMPL_H
#define MLIR_DIALECT_AFFINE_IR_VALUEBOUNDSOPINTERFACEIMPL_H

#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/LLVM.h"

namespace mlir {
class DialectRegistry;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Affine/LoopUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "mlir/IR/Block.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/RegionUtils.h"
#include <optional>

Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Affine/Transforms/Transforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "mlir/Interfaces/ValueBoundsOpInterface.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"

namespace mlir {
class AffineMap;
Expand Down
2 changes: 0 additions & 2 deletions mlir/include/mlir/Dialect/Affine/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ namespace memref {
class AllocOp;
} // namespace memref

struct LogicalResult;

namespace affine {
class AffineForOp;
class AffineIfOp;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Arith/Transforms/Transforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define MLIR_DIALECT_ARITH_TRANSFORMS_TRANSFORMS_H

#include "mlir/Interfaces/ValueBoundsOpInterface.h"
#include "mlir/Support/LogicalResult.h"

namespace mlir {
class Location;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def BufferizableOpInterface : OpInterface<"BufferizableOpInterface"> {
This method can query analysis information from the given analysis
state.
}],
/*retType=*/"::mlir::LogicalResult",
/*retType=*/"::llvm::LogicalResult",
/*methodName=*/"resolveConflicts",
/*args=*/(ins "::mlir::RewriterBase &":$rewriter,
"const ::mlir::bufferization::AnalysisState &":$state),
Expand Down Expand Up @@ -423,7 +423,7 @@ def BufferizableOpInterface : OpInterface<"BufferizableOpInterface"> {
suggestion to make sure IR is valid at every point in time and could
be done differently).
}],
/*retType=*/"::mlir::LogicalResult",
/*retType=*/"::llvm::LogicalResult",
/*methodName=*/"bufferize",
/*args=*/(ins "::mlir::RewriterBase &":$rewriter,
"const ::mlir::bufferization::BufferizationOptions &":$options),
Expand Down Expand Up @@ -490,7 +490,7 @@ def BufferizableOpInterface : OpInterface<"BufferizableOpInterface"> {
This method can be used to check expected invariants and limitations
of the current bufferization implementation.
}],
/*retType=*/"::mlir::LogicalResult",
/*retType=*/"::llvm::LogicalResult",
/*methodName=*/"verifyAnalysis",
/*args=*/(ins "const ::mlir::bufferization::AnalysisState &":$state),
/*methodBody=*/"",
Expand Down Expand Up @@ -613,7 +613,7 @@ def BufferizableOpInterface : OpInterface<"BufferizableOpInterface"> {
let extraClassDeclaration = [{
/// Resolve out-of-place tensor OpOperands with explicit allocations in the
/// form of `bufferization.alloc_tensor` ops.
::mlir::LogicalResult resolveTensorOpOperandConflicts(
::llvm::LogicalResult resolveTensorOpOperandConflicts(
::mlir::RewriterBase &rewriter,
const ::mlir::bufferization::AnalysisState &state);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
#ifndef MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_ONESHOTMODULEBUFFERIZE_H
#define MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_ONESHOTMODULEBUFFERIZE_H

namespace mlir {

namespace llvm {
struct LogicalResult;
} // namespace llvm

namespace mlir {
class ModuleOp;

namespace bufferization {
Expand All @@ -21,8 +23,9 @@ struct OneShotBufferizationOptions;

/// Analyze `moduleOp` and its nested ops. Bufferization decisions are stored in
/// `state`.
LogicalResult analyzeModuleOp(ModuleOp moduleOp, OneShotAnalysisState &state,
BufferizationStatistics *statistics = nullptr);
llvm::LogicalResult
analyzeModuleOp(ModuleOp moduleOp, OneShotAnalysisState &state,
BufferizationStatistics *statistics = nullptr);

/// Bufferize `op` and its nested ops that implement `BufferizableOpInterface`.
///
Expand All @@ -33,9 +36,9 @@ LogicalResult analyzeModuleOp(ModuleOp moduleOp, OneShotAnalysisState &state,
/// - `options.copyBeforeWrite` is not set and `options.noAnalysisFuncFilter`
/// is not empty. The FuncOps it contains were not analyzed. Buffer copies
/// will be inserted only to these FuncOps.
LogicalResult bufferizeModuleOp(ModuleOp moduleOp,
const OneShotBufferizationOptions &options,
BufferizationStatistics *statistics = nullptr);
llvm::LogicalResult
bufferizeModuleOp(ModuleOp moduleOp, const OneShotBufferizationOptions &options,
BufferizationStatistics *statistics = nullptr);

/// Remove bufferization attributes on every FuncOp arguments in the ModuleOp.
void removeBufferizationAttributesInModule(ModuleOp moduleOp);
Expand All @@ -44,7 +47,7 @@ void removeBufferizationAttributesInModule(ModuleOp moduleOp);
/// function call analysis to determine which function arguments are
/// inplaceable. Then analyzes and bufferizes FuncOps one-by-one with One-Shot
/// Bufferize.
LogicalResult runOneShotModuleBufferize(
llvm::LogicalResult runOneShotModuleBufferize(
ModuleOp moduleOp,
const bufferization::OneShotBufferizationOptions &options,
BufferizationStatistics *statistics = nullptr);
Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/Dialect/GPU/IR/CompilationAttrInterfaces.td
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def OffloadingLLVMTranslationAttrInterface :
The first argument has to be a GPU binary operation.
If the function fails at any point, it must return `failure`.
}],
"::mlir::LogicalResult", "embedBinary",
"::llvm::LogicalResult", "embedBinary",
(ins "::mlir::Operation*":$binaryOp,
"::llvm::IRBuilderBase&":$hostBuilder,
"::mlir::LLVM::ModuleTranslation&":$hostModuleTranslation)
Expand All @@ -130,7 +130,7 @@ def OffloadingLLVMTranslationAttrInterface :
respectively. If the function fails at any point, it must return
`failure`.
}],
"::mlir::LogicalResult", "launchKernel",
"::llvm::LogicalResult", "launchKernel",
(ins "::mlir::Operation*":$launchFunc, "::mlir::Operation*":$binaryOp,
"::llvm::IRBuilderBase&":$hostBuilder,
"::mlir::LLVM::ModuleTranslation&":$hostModuleTranslation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
namespace mlir {

class AffineMap;
struct LogicalResult;
class Operation;
class Region;

Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/GPU/Transforms/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <string>

namespace mlir {
struct LogicalResult;
class Operation;
class Value;

Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/IRDL/IR/IRDLInterfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/ExtensibleDialect.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/Types.h"
#include "mlir/Support/LogicalResult.h"
#include <optional>

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/IRDL/IR/IRDLTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#define MLIR_DIALECT_IRDL_IR_IRDLTRAITS_H_

#include "mlir/IR/OpDefinition.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/Casting.h"

namespace mlir {
Expand Down
7 changes: 5 additions & 2 deletions mlir/include/mlir/Dialect/IRDL/IRDLLoading.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@
#ifndef MLIR_DIALECT_IRDL_IRDLREGISTRATION_H
#define MLIR_DIALECT_IRDL_IRDLREGISTRATION_H

namespace mlir {
namespace llvm {
struct LogicalResult;
} // namespace llvm

namespace mlir {
class ModuleOp;
} // namespace mlir

namespace mlir {
namespace irdl {

/// Load all the dialects defined in the module.
LogicalResult loadDialects(ModuleOp op);
llvm::LogicalResult loadDialects(ModuleOp op);

} // namespace irdl
} // namespace mlir
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/IRDL/IRDLVerifiers.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <optional>

namespace mlir {
struct LogicalResult;
class InFlightDiagnostic;
class DynamicAttrDefinition;
class DynamicTypeDefinition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "mlir/IR/Attributes.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/Support/LogicalResult.h"

namespace mlir {
namespace transform {
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Linalg/TransformOps/Syntax.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "mlir/Support/LLVM.h"

namespace mlir {
class ParseResult;
class OpAsmParser;
class OpAsmPrinter;
class Type;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "mlir/Dialect/X86Vector/Transforms.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/TilingInterface.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallSet.h"
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Dialect/MemRef/Transforms/Transforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef MLIR_DIALECT_MEMREF_TRANSFORMS_TRANSFORMS_H
#define MLIR_DIALECT_MEMREF_TRANSFORMS_TRANSFORMS_H

#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/STLFunctionalExtras.h"

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Mesh/Transforms/Spmdization.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "mlir/Dialect/Mesh/IR/MeshOps.h"
#include "mlir/IR/DialectRegistry.h"
#include "mlir/Support/LogicalResult.h"

namespace mlir {
namespace mesh {
Expand Down
3 changes: 1 addition & 2 deletions mlir/include/mlir/Dialect/NVGPU/Transforms/Transforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#define MLIR_DIALECT_NVGPU_TRANSFORMS_TRANSFORMS_H_

#include "mlir/IR/Operation.h"
#include "mlir/Support/LogicalResult.h"

namespace mlir {
class RewriterBase;
Expand Down Expand Up @@ -44,7 +43,7 @@ namespace nvgpu {
/// function that depends on the row Index. The permutation function is chosen
/// to ensure that sequential distributed+vectorized reads/writes down a single
/// dimension of the memref have minimal conflicts.
mlir::LogicalResult optimizeSharedMemoryReadsAndWrites(Operation *parentOp,
llvm::LogicalResult optimizeSharedMemoryReadsAndWrites(Operation *parentOp,
Value memrefValue);

///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
//
// Defines the operation interface for atomic operations used in OpenACC and
// Defines the operation interface for atomic operations used in OpenACC and
// OpenMP.
//
//===----------------------------------------------------------------------===//
Expand Down Expand Up @@ -34,7 +34,7 @@ def AtomicReadOpInterface : OpInterface<"AtomicReadOpInterface"> {
InterfaceMethod<[{
Common verifier for operation that implements atomic read interface.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifyCommon",
/*args=*/(ins),
/*methodBody=*/"",
Expand Down Expand Up @@ -81,7 +81,7 @@ def AtomicWriteOpInterface : OpInterface<"AtomicWriteOpInterface"> {
InterfaceMethod<[{
Common verifier for operation that implements atomic write interface.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifyCommon",
/*args=*/(ins),
/*methodBody=*/"",
Expand Down Expand Up @@ -118,7 +118,7 @@ def AtomicUpdateOpInterface : OpInterface<"AtomicUpdateOpInterface"> {

The interface terminology uses `x` to specify the address where a value
is atomically written/read.

Since atomic update expression comes in many forms, this interface requires
that the operation uses a region with a single argument to capture the
expression.
Expand Down Expand Up @@ -162,9 +162,9 @@ def AtomicUpdateOpInterface : OpInterface<"AtomicUpdateOpInterface"> {
/*defaultImplementation=*/[{
// The atomic update is a no-op if the terminator is the first and only
// operation in its region.
mlir::Operation* terminator =
mlir::Operation* terminator =
llvm::dyn_cast<mlir::RegionBranchTerminatorOpInterface>($_op.getFirstOp());
return terminator && terminator->getOperands().front() ==
return terminator && terminator->getOperands().front() ==
$_op.getRegion().front().getArgument(0);
}]
>,
Expand All @@ -177,9 +177,9 @@ def AtomicUpdateOpInterface : OpInterface<"AtomicUpdateOpInterface"> {
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
mlir::Operation* terminator =
mlir::Operation* terminator =
llvm::dyn_cast<mlir::RegionBranchTerminatorOpInterface>($_op.getFirstOp());
if (terminator && terminator->getOperands().front() !=
if (terminator && terminator->getOperands().front() !=
$_op.getRegion().front().getArgument(0)) {
return terminator->getOperands().front();
}
Expand All @@ -189,7 +189,7 @@ def AtomicUpdateOpInterface : OpInterface<"AtomicUpdateOpInterface"> {
InterfaceMethod<[{
Common verifier for operation that implements atomic update interface.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifyCommon",
/*args=*/(ins),
/*methodBody=*/"",
Expand All @@ -210,7 +210,7 @@ def AtomicUpdateOpInterface : OpInterface<"AtomicUpdateOpInterface"> {
Common verifier of the required region for operation that implements
atomic update interface.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifyRegionsCommon",
/*args=*/(ins),
/*methodBody=*/"",
Expand All @@ -219,7 +219,7 @@ def AtomicUpdateOpInterface : OpInterface<"AtomicUpdateOpInterface"> {

if (terminator->getOperands().size() != 1)
return $_op.emitError("only updated value must be returned");

if (terminator->getOperands().front().getType() !=
$_op.getRegion().getArgument(0).getType())
return $_op.emitError("input and yielded value must have the same type");
Expand Down Expand Up @@ -272,7 +272,7 @@ def AtomicCaptureOpInterface : OpInterface<"AtomicCaptureOpInterface"> {
Common verifier of the required region for operation that implements
atomic capture interface.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifyRegionsCommon",
/*args=*/(ins),
/*methodBody=*/"",
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Polynomial/IR/Polynomial.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define MLIR_DIALECT_POLYNOMIAL_IR_POLYNOMIAL_H_

#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
Expand Down
2 changes: 0 additions & 2 deletions mlir/include/mlir/Dialect/SCF/Transforms/Transforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include "llvm/ADT/ArrayRef.h"

namespace mlir {

struct LogicalResult;
class Region;
class RewriterBase;
class Operation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
#define MLIR_DIALECT_SCF_UTILS_AFFINECANONICALIZATIONUTILS_H_

#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"

namespace mlir {
class AffineMap;
struct LogicalResult;
class Operation;
class OpFoldResult;
class RewriterBase;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/SCF/Utils/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include <optional>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def StageWithSortSparseOpInterface : OpInterface<"StageWithSortSparseOp"> {
/*methodBody=*/"">,
InterfaceMethod<
/*desc=*/"Stage the operation, return the final result value after staging.",
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"stageWithSort",
/*args=*/(ins "::mlir::PatternRewriter &":$rewriter,
"Value &":$tmpBuf),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"

#include "mlir/Dialect/Transform/Interfaces/TransformTypeInterfaces.h.inc"
Expand Down Expand Up @@ -1595,7 +1594,7 @@ mlir::transform::TransformEachOpTrait<OpTy>::apply(
}

template <typename OpTy>
mlir::LogicalResult
llvm::LogicalResult
mlir::transform::TransformEachOpTrait<OpTy>::verifyTrait(Operation *op) {
static_assert(OpTy::template hasTrait<OpTrait::OneOperand>(),
"expected single-operand op");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def ConversionPatternDescriptorOpInterface
Verify the default type converter that is provided by the enclosing
"apply_conversion_patterns" op.
}],
/*returnType=*/"::mlir::LogicalResult",
/*returnType=*/"::llvm::LogicalResult",
/*name=*/"verifyTypeConverter",
/*arguments=*/(ins "TypeConverterBuilderOpInterface":$builder),
/*methodBody=*/"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <memory>

namespace mlir {
struct LogicalResult;
class MLIRContext;
class ModuleOp;
class Operation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Dialect/Vector/Utils/VectorUtils.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/LogicalResult.h"

#include "mlir/Dialect/Vector/Transforms/VectorTransformsEnums.h.inc"

Expand Down
6 changes: 3 additions & 3 deletions mlir/include/mlir/ExecutionEngine/JitRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
namespace llvm {
class Module;
class LLVMContext;
struct LogicalResult;

namespace orc {
class MangleAndInterner;
Expand All @@ -34,7 +35,6 @@ namespace mlir {

class DialectRegistry;
class Operation;
struct LogicalResult;

/// JitRunner command line options used by JitRunnerConfig methods
struct JitRunnerOptions {
Expand All @@ -48,8 +48,8 @@ struct JitRunnerOptions {
struct JitRunnerConfig {
/// MLIR transformer applied after parsing the input into MLIR IR and before
/// passing the MLIR IR to the ExecutionEngine.
llvm::function_ref<LogicalResult(mlir::Operation *,
JitRunnerOptions &options)>
llvm::function_ref<llvm::LogicalResult(mlir::Operation *,
JitRunnerOptions &options)>
mlirTransformer = nullptr;

/// A custom function that is passed to ExecutionEngine. It processes MLIR and
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/IR/Action.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#define MLIR_IR_ACTION_H

#include "mlir/IR/Unit.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/TypeID.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Sequence.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/IR/AffineExpr.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Casting.h"
#include <functional>
#include <type_traits>

namespace mlir {
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/AffineExprVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define MLIR_IR_AFFINEEXPRVISITOR_H

#include "mlir/IR/AffineExpr.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/ArrayRef.h"

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/IR/AffineMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ struct AffineMapStorage;

class Attribute;
class Builder;
struct LogicalResult;
class OpFoldResult;
class MLIRContext;

Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/IR/BuiltinAttributeInterfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "mlir/IR/Attributes.h"
#include "mlir/IR/BuiltinTypeInterfaces.h"
#include "mlir/IR/Types.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/raw_ostream.h"
#include <complex>
#include <optional>
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/BuiltinAttributeInterfaces.td
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def MemRefLayoutAttrInterface : AttrInterface<"MemRefLayoutAttrInterface"> {

InterfaceMethod<
"Check if the current layout is applicable to the provided shape",
"::mlir::LogicalResult", "verifyLayout",
"::llvm::LogicalResult", "verifyLayout",
(ins "::llvm::ArrayRef<int64_t>":$shape,
"::llvm::function_ref<::mlir::InFlightDiagnostic()>":$emitError),
[{}],
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/IR/Diagnostics.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class SourceMgr;

namespace mlir {
class DiagnosticEngine;
struct LogicalResult;
class MLIRContext;
class Operation;
class OperationName;
Expand Down
3 changes: 0 additions & 3 deletions mlir/include/mlir/IR/Dialect.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
#include "mlir/IR/OperationSupport.h"
#include "mlir/Support/TypeID.h"

#include <map>
#include <tuple>

namespace mlir {
class DialectAsmParser;
class DialectAsmPrinter;
Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/IR/EnumAttr.td
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class IntEnumAttr<I intType, string name, string summary,
stringToSymbolFnName # [{(enumKeyword);
if (maybeEnum)
return *maybeEnum;
return {(::mlir::LogicalResult)($_parser.emitError(loc) << "expected " }] #
return {(::llvm::LogicalResult)($_parser.emitError(loc) << "expected " }] #
[{<< "}] # cppType # [{" << " to be one of: " << }] #
!interleave(!foreach(enum, enumerants, "\"" # enum.str # "\""),
[{ << ", " << }]) # [{)};
Expand Down Expand Up @@ -300,7 +300,7 @@ class BitEnumAttr<I intType, string name, string summary,
auto maybeEnum = }] # cppNamespace # "::" #
stringToSymbolFnName # [{(enumKeyword);
if (!maybeEnum) {
return {(::mlir::LogicalResult)($_parser.emitError(loc) << }] #
return {(::llvm::LogicalResult)($_parser.emitError(loc) << }] #
[{"expected " << "}] # cppType # [{" << " to be one of: " << }] #
!interleave(!foreach(enum, enumerants, "\"" # enum.str # "\""),
[{ << ", " << }]) # [{)};
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/IR/ExtensibleDialect.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class DynamicType;
class ExtensibleDialect;
class MLIRContext;
class OptionalParseResult;
class ParseResult;

namespace detail {
struct DynamicAttrStorage;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/IR/OperationSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class OpAsmPrinter;
class OperandRange;
class OperandRangeRange;
class OpFoldResult;
class ParseResult;
class Pattern;
class Region;
class ResultRange;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/IR/StorageUniquerSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/IR/AttrTypeSubElements.h"
#include "mlir/IR/DialectRegistry.h"
#include "mlir/Support/InterfaceSupport.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/StorageUniquer.h"
#include "mlir/Support/TypeID.h"
#include "llvm/ADT/FunctionExtras.h"
Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/IR/SymbolInterfaces.td
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def Symbol : OpInterface<"SymbolOpInterface"> {
symbol 'newSymbol' that are nested within the given operation 'from'.
Note: See mlir::SymbolTable::replaceAllSymbolUses for more details.
}],
"::mlir::LogicalResult", "replaceAllSymbolUses",
"::llvm::LogicalResult", "replaceAllSymbolUses",
(ins "::mlir::StringAttr":$newSymbol, "::mlir::Operation *":$from), [{}],
/*defaultImplementation=*/[{
return ::mlir::SymbolTable::replaceAllSymbolUses(this->getOperation(),
Expand Down Expand Up @@ -214,7 +214,7 @@ def SymbolUserOpInterface : OpInterface<"SymbolUserOpInterface"> {

let methods = [
InterfaceMethod<"Verify the symbol uses held by this operation.",
"::mlir::LogicalResult", "verifySymbolUses",
"::llvm::LogicalResult", "verifySymbolUses",
(ins "::mlir::SymbolTableCollection &":$symbolTable)
>,
];
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/TensorEncoding.td
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def VerifiableTensorEncoding : AttrInterface<"VerifiableTensorEncoding"> {
given shape and element type. Generates a diagnostic using
the supplied callback on failure.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifyEncoding",
/*args=*/(ins
"::mlir::ArrayRef<int64_t>":$shape,
Expand Down
3 changes: 2 additions & 1 deletion mlir/include/mlir/IR/Verifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
#ifndef MLIR_IR_VERIFIER_H
#define MLIR_IR_VERIFIER_H

#include "mlir/Support/LLVM.h"

namespace mlir {
struct LogicalResult;
class Operation;

/// Perform (potentially expensive) checks of invariants, used to detect
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/IR/Visitors.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#define MLIR_IR_VISITORS_H

#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"

namespace mlir {
Expand Down
10 changes: 5 additions & 5 deletions mlir/include/mlir/Interfaces/DataLayoutInterfaces.td
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def DataLayoutEntryInterface : AttrInterface<"DataLayoutEntryInterface"> {
InterfaceMethod<
/*description=*/"Checks that the entry is well-formed, reports errors "
"at the provided location.",
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifyEntry",
/*args=*/(ins "::mlir::Location":$loc),
/*methodBody=*/"",
Expand Down Expand Up @@ -166,7 +166,7 @@ def DataLayoutSpecInterface : AttrInterface<"DataLayoutSpecInterface"> {
InterfaceMethod<
/*description=*/"Verifies the validity of the specification and reports "
"any errors at the given location.",
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifySpec",
/*args=*/(ins "::mlir::Location":$loc),
/*methodBody=*/"",
Expand Down Expand Up @@ -232,7 +232,7 @@ def TargetDeviceSpecInterface : AttrInterface<"TargetDeviceSpecInterface"> {
InterfaceMethod<
/*description=*/"Checks that the entry is well-formed, reports errors "
"at the provided location.",
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifyEntry",
/*args=*/(ins "::mlir::Location":$loc),
/*methodBody=*/"",
Expand Down Expand Up @@ -275,7 +275,7 @@ def TargetSystemSpecInterface : AttrInterface<"TargetSystemSpecInterface"> {
InterfaceMethod<
/*description=*/"Verifies the validity of the specification and "
"reports any errors at the given location.",
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifySpec",
/*args=*/(ins "::mlir::Location":$loc),
/*methodBody=*/"",
Expand Down Expand Up @@ -574,7 +574,7 @@ def DataLayoutTypeInterface : TypeInterface<"DataLayoutTypeInterface"> {
InterfaceMethod<
/*description=*/"Verifies that the given list of entries is valid for "
"this type.",
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"verifyEntries",
/*args=*/(ins "::mlir::DataLayoutEntryListRef":$entries,
"::mlir::Location":$loc),
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Interfaces/FoldInterfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#define MLIR_INTERFACES_FOLDINTERFACES_H_

#include "mlir/IR/DialectInterface.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"

Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/Interfaces/FunctionInterfaces.td
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def FunctionOpInterface : OpInterface<"FunctionOpInterface", [
Note: The default implementation merely checks that if the entry block
exists, it has the same number and type of arguments as the function type.
}],
"::mlir::LogicalResult", "verifyBody", (ins),
"::llvm::LogicalResult", "verifyBody", (ins),
/*methodBody=*/[{}], /*defaultImplementation=*/[{
if ($_op.isExternal())
return success();
Expand Down Expand Up @@ -114,7 +114,7 @@ def FunctionOpInterface : OpInterface<"FunctionOpInterface", [
Verify the type attribute of the function for derived op-specific
invariants.
}],
"::mlir::LogicalResult", "verifyType", (ins),
"::llvm::LogicalResult", "verifyType", (ins),
/*methodBody=*/[{}], /*defaultImplementation=*/[{
return success();
}]>,
Expand Down
20 changes: 10 additions & 10 deletions mlir/include/mlir/Interfaces/InferTypeOpInterface.td
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def InferTypeOpInterface : OpInterface<"InferTypeOpInterface"> {
called with valid arguments, e.g., operands are verified, or it may result
in an undefined behavior.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"inferReturnTypes",
/*args=*/(ins "::mlir::MLIRContext *":$context,
"::std::optional<::mlir::Location>":$location,
Expand Down Expand Up @@ -72,7 +72,7 @@ def InferTypeOpInterface : OpInterface<"InferTypeOpInterface"> {
represent fully valid IR and are responsible for checking inputs for
validity to the degree necessary to perform the return type inference.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"refineReturnTypes",
/*args=*/(ins "::mlir::MLIRContext *":$context,
"::std::optional<::mlir::Location>":$location,
Expand Down Expand Up @@ -150,7 +150,7 @@ def InferShapedTypeOpInterface : OpInterface<"InferShapedTypeOpInterface"> {
represent fully valid IR and are responsible for checking inputs for
validity to the degree necessary to perform the return type inference.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"inferReturnTypeComponents",
/*args=*/(ins "::mlir::MLIRContext*":$context,
"::std::optional<::mlir::Location>":$location,
Expand Down Expand Up @@ -180,7 +180,7 @@ def InferShapedTypeOpInterface : OpInterface<"InferShapedTypeOpInterface"> {
operands to avoid calling `getOperand` directly inside the interface
implementation.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"reifyReturnTypeShapes",
/*args=*/(ins "::mlir::OpBuilder&":$builder,
"::mlir::ValueRange":$operands,
Expand All @@ -201,14 +201,14 @@ class InferTypeOpAdaptorBase<code additionalDecls = [{}]> : TraitList<
/*name=*/"InferTypeOpAdaptor",
/*traits=*/[],
/*extraOpDeclaration=*/[{
static ::mlir::LogicalResult
static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
}] # additionalDecls,
/*extraOpDefinition=*/[{
::mlir::LogicalResult
::llvm::LogicalResult
$cppClass::inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
Expand Down Expand Up @@ -239,14 +239,14 @@ class InferShapedTypeOpAdaptorBase<list<string> overridenMethods = []> : TraitLi
/*name=*/"InferShapedTypeOpAdaptor",
/*traits=*/[],
/*extraOpDeclaration=*/[{
static ::mlir::LogicalResult
static ::llvm::LogicalResult
inferReturnTypeComponents(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
Adaptor adaptor,
::llvm::SmallVectorImpl<::mlir::ShapedTypeComponents> &inferredReturnShapes);
}],
/*extraOpDefinition=*/[{
::mlir::LogicalResult
::llvm::LogicalResult
$cppClass::inferReturnTypeComponents(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
::mlir::ValueShapeRange operands, ::mlir::DictionaryAttr attributes,
Expand Down Expand Up @@ -281,7 +281,7 @@ class InferTensorTypeBase<list<string> overridenMethods = []> : TraitList<
/*traits=*/[],
/*extraOpDeclaration=*/[{}],
/*extraOpDefinition=*/[{
::mlir::LogicalResult
::llvm::LogicalResult
$cppClass::inferReturnTypes(::mlir::MLIRContext *context,
std::optional<::mlir::Location> location,
::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
Expand Down Expand Up @@ -364,7 +364,7 @@ def ReifyRankedShapedTypeOpInterface :

If the shape of a particular result cannot be computed it must be empty.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"reifyResultShapes",
/*args=*/(ins "::mlir::OpBuilder &":$builder,
"::mlir::ReifiedRankedShapedTypeDims &":$reifiedReturnShapes)
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Interfaces/LoopLikeInterface.td
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> {
have a single iteration. Returns "success" if the promotion was
successful.
}],
/*retTy=*/"::mlir::LogicalResult",
/*retTy=*/"::llvm::LogicalResult",
/*methodName=*/"promoteIfSingleIteration",
/*args=*/(ins "::mlir::RewriterBase &":$rewriter),
/*methodBody=*/"",
Expand Down
6 changes: 3 additions & 3 deletions mlir/include/mlir/Interfaces/MemorySlotInterfaces.td
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def PromotableAllocationOpInterface
"::std::optional<::mlir::PromotableAllocationOpInterface>",
"handlePromotionComplete",
(ins
"const ::mlir::MemorySlot &":$slot,
"const ::mlir::MemorySlot &":$slot,
"::mlir::Value":$defaultValue,
"::mlir::OpBuilder &":$builder)
>,
Expand Down Expand Up @@ -308,7 +308,7 @@ def DestructurableAllocationOpInterface
This will only be called for slots declared by this operation.

Must return a new destructurable allocation op if this hook creates
a new destructurable op, nullopt otherwise.
a new destructurable op, nullopt otherwise.
}],
"::std::optional<::mlir::DestructurableAllocationOpInterface>",
"handleDestructuringComplete",
Expand Down Expand Up @@ -338,7 +338,7 @@ def SafeMemorySlotAccessOpInterface

No IR mutation is allowed in this method.
}],
"::mlir::LogicalResult",
"::llvm::LogicalResult",
"ensureOnlySafeAccesses",
(ins "const ::mlir::MemorySlot &":$slot,
"::mlir::SmallVectorImpl<::mlir::MemorySlot> &":$mustBeSafelyUsed,
Expand Down
20 changes: 10 additions & 10 deletions mlir/include/mlir/Interfaces/TilingInterface.td
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def TilingInterface : OpInterface<"TilingInterface"> {
the tiling algorithm (like `scf::tileUsingSCF`) can generate the inter-tile
loop structure, and call into the methods of the interface to be able to
tile any operation that implements the interface.

This interface is also meant to help with "tile and fuse", i.e. the process
of fusing a producer with a consumer by
a) Tiling the consumer
Expand All @@ -50,7 +50,7 @@ def TilingInterface : OpInterface<"TilingInterface"> {

For an operation to be "tiled and fused" with its (already tiled) consumer,
an operation has to implement the following additional method (see
description below):
description below):
- `generateResultTileValue`
- `getIterationDomainTileFromResultTile`

Expand Down Expand Up @@ -146,7 +146,7 @@ def TilingInterface : OpInterface<"TilingInterface"> {
Note: It is undefined behaviour if there is overlap between the
tiles of the result generated by the tiled implementation.
}],
/*retType=*/"::mlir::LogicalResult",
/*retType=*/"::llvm::LogicalResult",
/*methodName=*/"getResultTilePosition",
/*args=*/(ins
"OpBuilder &":$b,
Expand Down Expand Up @@ -289,7 +289,7 @@ def TilingInterface : OpInterface<"TilingInterface"> {
implemented using `getIterationDomainTileFromOperandTile` +
`getTiledImplementation` methods.
}],
/*retType=*/"::mlir::LogicalResult",
/*retType=*/"::llvm::LogicalResult",
/*methodName=*/"getIterationDomainTileFromOperandTile",
/*args=*/(ins
"OpBuilder &":$b,
Expand Down Expand Up @@ -317,14 +317,14 @@ def TilingInterface : OpInterface<"TilingInterface"> {
- `sizes` is the size of the slice of the producer result used by the
consumer.
If fusion of the producer with the consumer is not legal for the
result, or if this mapping cannot be computed, the implementation
result, or if this mapping cannot be computed, the implementation
should return a failure.
For most cases `generateResultTileValue` could be a implemented using
`getIterationDomainTileFromResultTile` + `getTiledImplementation`

For most cases `generateResultTileValue` could be a implemented using
`getIterationDomainTileFromResultTile` + `getTiledImplementation`
methods.
}],
/*retType=*/"::mlir::LogicalResult",
/*retType=*/"::llvm::LogicalResult",
/*methodName=*/"getIterationDomainTileFromResultTile",
/*args=*/(ins
"OpBuilder &":$b,
Expand All @@ -349,7 +349,7 @@ def TilingInterface : OpInterface<"TilingInterface"> {
transformations are done, this method can be used to lower to scalar
code that can then be lowered to LLVM or SPIR-V dialects.
}],
/*retType=*/"::mlir::LogicalResult",
/*retType=*/"::llvm::LogicalResult",
/*methodName=*/"generateScalarImplementation",
/*args=*/(ins
"OpBuilder &":$b,
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Pass/Pass.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "mlir/IR/Action.h"
#include "mlir/Pass/AnalysisManager.h"
#include "mlir/Pass/PassRegistry.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/Statistic.h"
#include <optional>
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Pass/PassManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "mlir/IR/Dialect.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/Timing.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/iterator.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Pass/PassOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#define MLIR_PASS_PASSOPTIONS_H_

#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/CommandLine.h"
Expand Down
13 changes: 6 additions & 7 deletions mlir/include/mlir/Query/Query.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define MLIR_TOOLS_MLIRQUERY_QUERY_H

#include "Matcher/VariantValue.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/LineEditor/LineEditor.h"
Expand All @@ -27,7 +26,7 @@ struct Query : llvm::RefCountedBase<Query> {
virtual ~Query();

// Perform the query on qs and print output to os.
virtual mlir::LogicalResult run(llvm::raw_ostream &os,
virtual llvm::LogicalResult run(llvm::raw_ostream &os,
QuerySession &qs) const = 0;

llvm::StringRef remainingContent;
Expand All @@ -45,7 +44,7 @@ complete(llvm::StringRef line, size_t pos, const QuerySession &qs);
struct InvalidQuery : Query {
InvalidQuery(const llvm::Twine &errStr)
: Query(QueryKind::Invalid), errStr(errStr.str()) {}
mlir::LogicalResult run(llvm::raw_ostream &os,
llvm::LogicalResult run(llvm::raw_ostream &os,
QuerySession &qs) const override;

std::string errStr;
Expand All @@ -58,7 +57,7 @@ struct InvalidQuery : Query {
// No-op query (i.e. a blank line).
struct NoOpQuery : Query {
NoOpQuery() : Query(QueryKind::NoOp) {}
mlir::LogicalResult run(llvm::raw_ostream &os,
llvm::LogicalResult run(llvm::raw_ostream &os,
QuerySession &qs) const override;

static bool classof(const Query *query) {
Expand All @@ -69,7 +68,7 @@ struct NoOpQuery : Query {
// Query for "help".
struct HelpQuery : Query {
HelpQuery() : Query(QueryKind::Help) {}
mlir::LogicalResult run(llvm::raw_ostream &os,
llvm::LogicalResult run(llvm::raw_ostream &os,
QuerySession &qs) const override;

static bool classof(const Query *query) {
Expand All @@ -80,7 +79,7 @@ struct HelpQuery : Query {
// Query for "quit".
struct QuitQuery : Query {
QuitQuery() : Query(QueryKind::Quit) {}
mlir::LogicalResult run(llvm::raw_ostream &os,
llvm::LogicalResult run(llvm::raw_ostream &os,
QuerySession &qs) const override;

static bool classof(const Query *query) {
Expand All @@ -92,7 +91,7 @@ struct QuitQuery : Query {
struct MatchQuery : Query {
MatchQuery(llvm::StringRef source, const matcher::DynMatcher &matcher)
: Query(QueryKind::Match), matcher(matcher), source(source) {}
mlir::LogicalResult run(llvm::raw_ostream &os,
llvm::LogicalResult run(llvm::raw_ostream &os,
QuerySession &qs) const override;

const matcher::DynMatcher matcher;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Reducer/ReductionNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include "mlir/IR/OwningOpRef.h"
#include "mlir/Reducer/Tester.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/ToolOutputFile.h"
Expand Down
14 changes: 13 additions & 1 deletion mlir/include/mlir/Support/LLVM.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
// We include this header because it cannot be practically forward
// declared, and are effectively language features.
#include "llvm/Support/Casting.h"
#include <vector>

// We include this header because large portions of mlir would have to include
// it anyway.
#include "llvm/Support/LogicalResult.h"

// Workaround for clang-5 (PR41549)
#if defined(__clang_major__)
Expand Down Expand Up @@ -151,6 +154,15 @@ using llvm::iterator_range;
using llvm::raw_ostream;
using llvm::SMLoc;
using llvm::SMRange;

// LogicalResult.
using llvm::failed;
using llvm::failure;
using llvm::FailureOr;
using llvm::LogicalResult;
using llvm::ParseResult;
using llvm::succeeded;
using llvm::success;
} // namespace mlir

#endif // MLIR_SUPPORT_LLVM_H
127 changes: 11 additions & 116 deletions mlir/include/mlir/Support/LogicalResult.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===- LogicalResult.h - Utilities for handling success/failure -*- C++ -*-===//
//===- LogicalResult.h - Stub aliasing to llvm/LogicalResult ----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -9,123 +9,18 @@
#ifndef MLIR_SUPPORT_LOGICALRESULT_H
#define MLIR_SUPPORT_LOGICALRESULT_H

#include "mlir/Support/LLVM.h"
#include <optional>
#include "llvm/Support/LogicalResult.h"

// TODO: This header is a stop-gap to avoid breaking downstream, and is to be
// removed eventually.
namespace mlir {

/// This class represents an efficient way to signal success or failure. It
/// should be preferred over the use of `bool` when appropriate, as it avoids
/// all of the ambiguity that arises in interpreting a boolean result. This
/// class is marked as NODISCARD to ensure that the result is processed. Users
/// may explicitly discard a result by using `(void)`, e.g.
/// `(void)functionThatReturnsALogicalResult();`. Given the intended nature of
/// this class, it generally shouldn't be used as the result of functions that
/// very frequently have the result ignored. This class is intended to be used
/// in conjunction with the utility functions below.
struct [[nodiscard]] LogicalResult {
public:
/// If isSuccess is true a `success` result is generated, otherwise a
/// 'failure' result is generated.
static LogicalResult success(bool isSuccess = true) {
return LogicalResult(isSuccess);
}

/// If isFailure is true a `failure` result is generated, otherwise a
/// 'success' result is generated.
static LogicalResult failure(bool isFailure = true) {
return LogicalResult(!isFailure);
}

/// Returns true if the provided LogicalResult corresponds to a success value.
bool succeeded() const { return isSuccess; }

/// Returns true if the provided LogicalResult corresponds to a failure value.
bool failed() const { return !isSuccess; }

private:
LogicalResult(bool isSuccess) : isSuccess(isSuccess) {}

/// Boolean indicating if this is a success result, if false this is a
/// failure result.
bool isSuccess;
};

/// Utility function to generate a LogicalResult. If isSuccess is true a
/// `success` result is generated, otherwise a 'failure' result is generated.
inline LogicalResult success(bool isSuccess = true) {
return LogicalResult::success(isSuccess);
}

/// Utility function to generate a LogicalResult. If isFailure is true a
/// `failure` result is generated, otherwise a 'success' result is generated.
inline LogicalResult failure(bool isFailure = true) {
return LogicalResult::failure(isFailure);
}

/// Utility function that returns true if the provided LogicalResult corresponds
/// to a success value.
inline bool succeeded(LogicalResult result) { return result.succeeded(); }

/// Utility function that returns true if the provided LogicalResult corresponds
/// to a failure value.
inline bool failed(LogicalResult result) { return result.failed(); }

/// This class provides support for representing a failure result, or a valid
/// value of type `T`. This allows for integrating with LogicalResult, while
/// also providing a value on the success path.
template <typename T>
class [[nodiscard]] FailureOr : public std::optional<T> {
public:
/// Allow constructing from a LogicalResult. The result *must* be a failure.
/// Success results should use a proper instance of type `T`.
FailureOr(LogicalResult result) {
assert(failed(result) &&
"success should be constructed with an instance of 'T'");
}
FailureOr() : FailureOr(failure()) {}
FailureOr(T &&y) : std::optional<T>(std::forward<T>(y)) {}
FailureOr(const T &y) : std::optional<T>(y) {}
template <typename U,
std::enable_if_t<std::is_constructible<T, U>::value> * = nullptr>
FailureOr(const FailureOr<U> &other)
: std::optional<T>(failed(other) ? std::optional<T>()
: std::optional<T>(*other)) {}

operator LogicalResult() const { return success(this->has_value()); }

private:
/// Hide the bool conversion as it easily creates confusion.
using std::optional<T>::operator bool;
using std::optional<T>::has_value;
};

/// Wrap a value on the success path in a FailureOr of the same value type.
template <typename T,
typename = std::enable_if_t<!std::is_convertible_v<T, bool>>>
inline auto success(T &&t) {
return FailureOr<std::decay_t<T>>(std::forward<T>(t));
}

/// This class represents success/failure for parsing-like operations that find
/// it important to chain together failable operations with `||`. This is an
/// extended version of `LogicalResult` that allows for explicit conversion to
/// bool.
///
/// This class should not be used for general error handling cases - we prefer
/// to keep the logic explicit with the `succeeded`/`failed` predicates.
/// However, traditional monadic-style parsing logic can sometimes get
/// swallowed up in boilerplate without this, so we provide this for narrow
/// cases where it is important.
///
class [[nodiscard]] ParseResult : public LogicalResult {
public:
ParseResult(LogicalResult result = success()) : LogicalResult(result) {}

/// Failure is true in a boolean context.
explicit operator bool() const { return failed(); }
};

using llvm::failed;
using llvm::failure;
using llvm::FailureOr;
using llvm::LogicalResult;
using llvm::ParseResult;
using llvm::succeeded;
using llvm::success;
} // namespace mlir

#endif // MLIR_SUPPORT_LOGICALRESULT_H
1 change: 0 additions & 1 deletion mlir/include/mlir/Support/StorageUniquer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define MLIR_SUPPORT_STORAGEUNIQUER_H

#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/TypeID.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseSet.h"
Expand Down
2 changes: 0 additions & 2 deletions mlir/include/mlir/Support/ToolUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class MemoryBuffer;
} // namespace llvm

namespace mlir {
struct LogicalResult;

using ChunkBufferHandler = function_ref<LogicalResult(
std::unique_ptr<llvm::MemoryBuffer> chunkBuffer, raw_ostream &os)>;

Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Target/Cpp/CppEmitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/Support/LLVM.h"

namespace mlir {
struct LogicalResult;
class Operation;
namespace emitc {

Expand Down
1 change: 1 addition & 0 deletions mlir/include/mlir/Target/LLVM/ROCDL/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "mlir/Dialect/GPU/IR/CompilationInterfaces.h"
#include "mlir/Dialect/LLVMIR/ROCDLDialect.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Target/LLVM/ModuleToObject.h"

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Target/LLVMIR/LLVMImportInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/DialectInterface.h"
#include "mlir/IR/Location.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Support/FormatVariadic.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Target/LLVMIR/LLVMTranslationInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/DialectInterface.h"
#include "mlir/Support/LogicalResult.h"

namespace llvm {
class Instruction;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Target/SPIRV/Serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/Support/LLVM.h"

namespace mlir {
struct LogicalResult;
class MLIRContext;

namespace spirv {
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Tools/PDLL/AST/Diagnostic.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <optional>

#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/Support/SourceMgr.h"

Expand Down
2 changes: 0 additions & 2 deletions mlir/include/mlir/Tools/PDLL/CodeGen/MLIRGen.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

#include <memory>

#include "mlir/Support/LogicalResult.h"

namespace llvm {
class SourceMgr;
} // namespace llvm
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Tools/PDLL/Parser/Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <memory>

#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/LLVM.h"

namespace llvm {
class SourceMgr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "llvm/ADT/StringMap.h"
#include <memory>
#include <string>
#include <vector>

namespace mlir {
namespace lsp {
Expand Down
3 changes: 0 additions & 3 deletions mlir/include/mlir/Tools/lsp-server-support/Protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include <bitset>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>

namespace mlir {
struct LogicalResult;

namespace lsp {

enum class ErrorCode {
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Tools/lsp-server-support/Transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "mlir/Support/DebugStringHelper.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Tools/lsp-server-support/Logging.h"
#include "mlir/Tools/lsp-server-support/Protocol.h"
#include "llvm/ADT/FunctionExtras.h"
Expand Down
9 changes: 6 additions & 3 deletions mlir/include/mlir/Tools/mlir-lsp-server/MlirLspServerMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@
#ifndef MLIR_TOOLS_MLIR_LSP_SERVER_MLIRLSPSERVERMAIN_H
#define MLIR_TOOLS_MLIR_LSP_SERVER_MLIRLSPSERVERMAIN_H

namespace llvm {
struct LogicalResult;
} // namespace llvm

namespace mlir {
class DialectRegistry;
struct LogicalResult;

/// Implementation for tools like `mlir-lsp-server`.
/// - registry should contain all the dialects that can be parsed in source IR
/// passed to the server.
LogicalResult MlirLspServerMain(int argc, char **argv,
DialectRegistry &registry);
llvm::LogicalResult MlirLspServerMain(int argc, char **argv,
DialectRegistry &registry);

} // namespace mlir

Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#define MLIR_TOOLS_MLIROPT_MLIROPTMAIN_H

#include "mlir/Debug/CLOptionsSetup.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/ToolUtilities.h"
#include "llvm/ADT/StringRef.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
#ifndef MLIR_TOOLS_MLIR_PDLL_LSP_SERVER_MLIRPDLLLSPSERVERMAIN_H
#define MLIR_TOOLS_MLIR_PDLL_LSP_SERVER_MLIRPDLLLSPSERVERMAIN_H

namespace mlir {
namespace llvm {
struct LogicalResult;
} // namespace llvm

namespace mlir {
/// Implementation for tools like `mlir-pdll-lsp-server`.
LogicalResult MlirPdllLspServerMain(int argc, char **argv);
llvm::LogicalResult MlirPdllLspServerMain(int argc, char **argv);

} // namespace mlir

Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Tools/mlir-query/MlirQueryMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define MLIR_TOOLS_MLIRQUERY_MLIRQUERYMAIN_H

#include "mlir/Query/Matcher/Registry.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/LLVM.h"

namespace mlir {

Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Tools/mlir-reduce/MlirReduceMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef MLIR_TOOLS_MLIR_REDUCE_MLIRREDUCEMAIN_H
#define MLIR_TOOLS_MLIR_REDUCE_MLIRREDUCEMAIN_H

#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/LLVM.h"

namespace mlir {

Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Tools/mlir-translate/MlirTranslateMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#ifndef MLIR_TOOLS_MLIRTRANSLATE_MLIRTRANSLATEMAIN_H
#define MLIR_TOOLS_MLIRTRANSLATE_MLIRTRANSLATEMAIN_H

#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/StringRef.h"

namespace mlir {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
#ifndef MLIR_TOOLS_TBLGENLSPSERVER_TABLEGENLSPSERVERMAIN_H
#define MLIR_TOOLS_TBLGENLSPSERVER_TABLEGENLSPSERVERMAIN_H

namespace mlir {
namespace llvm {
struct LogicalResult;
} // namespace llvm

namespace mlir {
/// Implementation for tools like `tblgen-lsp-server`.
LogicalResult TableGenLspServerMain(int argc, char **argv);

llvm::LogicalResult TableGenLspServerMain(int argc, char **argv);
} // namespace mlir

#endif // MLIR_TOOLS_TBLGENLSPSERVER_TABLEGENLSPSERVERMAIN_H
1 change: 0 additions & 1 deletion mlir/include/mlir/Transforms/HomomorphismSimplification.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/Value.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Casting.h"
#include <iterator>
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Transforms/Inliner.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "mlir/Interfaces/CallInterfaces.h"
#include "mlir/Pass/AnalysisManager.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/StringMap.h"

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Transforms/LocationSnapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

namespace mlir {
class Location;
struct LogicalResult;
class Operation;
class OpPrintingFlags;
class Pass;
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/Transforms/SROA.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define MLIR_TRANSFORMS_SROA_H

#include "mlir/Interfaces/MemorySlotInterfaces.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/Statistic.h"

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Analysis/AliasAnalysis/LocalAliasAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Interfaces/ViewLikeInterface.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/Casting.h"
#include <cassert>
#include <optional>
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Analysis/DataFlow/ConstantPropagationAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "mlir/IR/Operation.h"
#include "mlir/IR/Value.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mlir/Interfaces/CallInterfaces.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/Casting.h"
#include <cassert>
#include <optional>
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Analysis/DataFlow/DenseAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/Interfaces/CallInterfaces.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Casting.h"
#include <cassert>
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mlir/Interfaces/CallInterfaces.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Casting.h"
#include <cassert>
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Analysis/DataFlowFramework.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "mlir/IR/Location.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/Value.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/iterator.h"
#include "llvm/Config/abi-breaking.h"
#include "llvm/Support/Casting.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Analysis/FlatLinearValueConstraints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/IR/Builders.h"
#include "mlir/IR/IntegerSet.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/AsmParser/AffineParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/IntegerSet.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/AsmParser/AsmParserState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "mlir/IR/Types.h"
#include "mlir/IR/Value.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/AsmParser/DialectSymbolParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include <cassert>
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/AsmParser/LocationParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/Location.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"

using namespace mlir;
using namespace mlir::detail;
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/AsmParser/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "mlir/IR/Verifier.h"
#include "mlir/IR/Visitors.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/TypeID.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/DenseMap.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/AsmParser/TypeParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/TensorEncoding.h"
#include "mlir/IR/Types.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include <cassert>
#include <cstdint>
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Bytecode/Reader/BytecodeReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "mlir/IR/Verifier.h"
#include "mlir/IR/Visitors.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/StringExtras.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/MapVector.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/CAPI/IR/BuiltinTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/Support/LogicalResult.h"

#include <algorithm>

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/ArithToAMDGPU/ArithToAMDGPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/ArithToEmitC/ArithToEmitC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "mlir/Dialect/EmitC/IR/EmitC.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"

using namespace mlir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"

namespace mlir {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/Dialect/SPIRV/Utils/LayoutUtils.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FormatVariadic.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/SymbolTable.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/Passes.h"
#include "llvm/ADT/SmallVector.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/FuncToSPIRV/FuncToSPIRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"
#include "mlir/Dialect/SPIRV/Utils/LayoutUtils.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/Debug.h"

#define DEBUG_TYPE "func-to-spirv-pattern"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Matchers.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include <optional>

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/Visitors.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/Debug.h"
#include <cassert>
#include <optional>
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "mlir/IR/Value.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/raw_ostream.h"

#define DEBUG_TYPE "nvvm-to-llvm"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "mlir/Dialect/SPIRV/Utils/LayoutUtils.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FormatVariadic.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/TensorToLinalg/TensorToLinalg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/Debug.h"

#define DEBUG_TYPE "tensor-to-linalg-pattern"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/TensorToSPIRV/TensorToSPIRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mlir/Dialect/SPIRV/Utils/LayoutUtils.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/Debug.h"

#define DEBUG_TYPE "tensor-to-spirv-pattern"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Region.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "mlir/Transforms/Passes.h"
#include "llvm/ADT/STLExtras.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "mlir/Dialect/Affine/Utils.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/IR/Dominance.h"
#include "mlir/Support/LogicalResult.h"
#include <algorithm>

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Arith/IR/ArithOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Support/LogicalResult.h"

#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Arith/Transforms/EmulateNarrowType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "mlir/Dialect/Func/Transforms/FuncConversions.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/APInt.h"
#include "llvm/Support/FormatVariadic.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/APInt.h"
#include "llvm/Support/FormatVariadic.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Arith/Transforms/IntNarrowing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/ValueBoundsOpInterface.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"

#define DEBUG_TYPE "lower-contract-to-arm-neon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/FunctionImplementation.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/InliningUtils.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/TypeSwitch.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/GPU/Transforms/SubgroupReduceLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/Location.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"
#include <cassert>
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/IRDL/IR/IRDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/Operation.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/IR/Metadata.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/IRDL/IRDLLoading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/ExtensibleDialect.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/SMLoc.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/IRDL/IRDLVerifiers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/Location.h"
#include "mlir/IR/Region.h"
#include "mlir/IR/Value.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/FormatVariadic.h"

using namespace mlir;
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/LLVMIR/IR/BasicPtxBuilderInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h"
#include "mlir/Support/LogicalResult.h"

#define DEBUG_TYPE "ptx-builder"
#define DBGS() (llvm::dbgs() << "[" DEBUG_TYPE "]: ")
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "mlir/IR/Operation.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/Types.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/AsmParser/Parser.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "mlir/IR/SymbolTable.h"
#include "mlir/IR/Value.h"
#include "mlir/Interfaces/TilingInterface.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Linalg/Transforms/TransposeConv2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/ValueRange.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/ADT/SmallVector.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/MemRef/IR/MemRefMemorySlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "mlir/IR/Value.h"
#include "mlir/Interfaces/InferTypeOpInterface.h"
#include "mlir/Interfaces/MemorySlotInterfaces.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/ErrorHandling.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "mlir/IR/Value.h"
#include "mlir/Interfaces/ViewLikeInterface.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/IRMapping.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Mesh/Transforms/ShardingPropagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "mlir/IR/Verifier.h"
#include "mlir/Interfaces/FunctionInterfaces.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/iterator_range.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Mesh/Transforms/Simplifications.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/SymbolTable.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include <numeric>
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Mesh/Transforms/Spmdization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "mlir/Interfaces/FunctionInterfaces.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/NVGPU/Transforms/MmaSyncTF32Transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/Dialect/NVGPU/IR/NVGPUDialect.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/MathExtras.h"

Expand Down
3 changes: 1 addition & 2 deletions mlir/lib/Dialect/NVGPU/Transforms/OptimizeSharedMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "mlir/Dialect/NVGPU/Transforms/Utils.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/MathExtras.h"

Expand Down Expand Up @@ -146,7 +145,7 @@ getShmReadAndWriteOps(Operation *parentOp, Value shmMemRef,
return success();
}

mlir::LogicalResult
llvm::LogicalResult
mlir::nvgpu::optimizeSharedMemoryReadsAndWrites(Operation *parentOp,
Value memrefValue) {
auto memRefType = dyn_cast<MemRefType>(memrefValue.getType());
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "mlir/Dialect/OpenMP/OpenMPOpsEnums.cpp.inc"
#include "mlir/Dialect/OpenMP/OpenMPOpsInterfaces.cpp.inc"
#include "mlir/Dialect/OpenMP/OpenMPTypeInterfaces.cpp.inc"
#include "mlir/Support/LogicalResult.h"

using namespace mlir;
using namespace mlir::omp;
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Polynomial/IR/Polynomial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "mlir/Dialect/Polynomial/IR/Polynomial.h"

#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/SmallVector.h"

namespace mlir {
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Polynomial/IR/PolynomialAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "mlir/Dialect/Polynomial/IR/Polynomial.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Polynomial/IR/PolynomialDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mlir/IR/Dialect.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/InferTypeOpInterface.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/TypeSwitch.h"

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Polynomial/IR/PolynomialOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/APInt.h"

using namespace mlir;
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Quant/IR/QuantDialectBytecode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/TypeSwitch.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "mlir/IR/Operation.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/FunctionImplementation.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "mlir/IR/Location.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ LogicalResult tosa::ReshapeOp::inferReturnTypeComponents(
return success();
}

mlir::LogicalResult tosa::ReshapeOp::verify() {
llvm::LogicalResult tosa::ReshapeOp::verify() {
TensorType inputType = getInput1().getType();
RankedTensorType outputType = getType();

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Tosa/Transforms/TosaFolders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Matchers.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/ADT/SmallVector.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "mlir/IR/Operation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/CastInterfaces.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Vector/Transforms/LowerVectorBitCast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/Dialect/Vector/Utils/VectorUtils.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/LogicalResult.h"

#define DEBUG_TYPE "vector-bitcast-lowering"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/VectorInterfaces.h"
#include "mlir/Support/LogicalResult.h"

#define DEBUG_TYPE "vector-broadcast-lowering"

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Vector/Transforms/LowerVectorContract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/VectorInterfaces.h"
#include "mlir/Support/LogicalResult.h"

#define DEBUG_TYPE "vector-contract-lowering"

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Vector/Transforms/LowerVectorGather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/VectorInterfaces.h"
#include "mlir/Support/LogicalResult.h"

#define DEBUG_TYPE "vector-broadcast-lowering"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/Dialect/Vector/Utils/VectorUtils.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/LogicalResult.h"

#define DEBUG_TYPE "vector-interleave-lowering"

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Vector/Transforms/LowerVectorScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/VectorInterfaces.h"
#include "mlir/Support/LogicalResult.h"

#define DEBUG_TYPE "vector-broadcast-lowering"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/VectorInterfaces.h"
#include "mlir/Support/LogicalResult.h"

#define DEBUG_TYPE "vector-shape-cast-lowering"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/VectorInterfaces.h"
#include "mlir/Support/LogicalResult.h"

#define DEBUG_TYPE "lower-vector-transpose"

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Vector/Transforms/VectorLinearize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mlir/IR/Operation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/ArrayRef.h"
#include <cstdint>
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/VectorInterfaces.h"
#include "mlir/Support/LogicalResult.h"

#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/MapVector.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/IR/AffineMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallSet.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/IR/ExtensibleDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/StorageUniquerSupport.h"
#include "mlir/Support/LogicalResult.h"

using namespace mlir;

Expand Down
16 changes: 5 additions & 11 deletions mlir/lib/Query/Query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "mlir/IR/IRMapping.h"
#include "mlir/Query/Matcher/MatchFinder.h"
#include "mlir/Query/QuerySession.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"

Expand Down Expand Up @@ -102,19 +101,16 @@ static Operation *extractFunction(std::vector<Operation *> &ops,

Query::~Query() = default;

mlir::LogicalResult InvalidQuery::run(llvm::raw_ostream &os,
QuerySession &qs) const {
LogicalResult InvalidQuery::run(llvm::raw_ostream &os, QuerySession &qs) const {
os << errStr << "\n";
return mlir::failure();
}

mlir::LogicalResult NoOpQuery::run(llvm::raw_ostream &os,
QuerySession &qs) const {
LogicalResult NoOpQuery::run(llvm::raw_ostream &os, QuerySession &qs) const {
return mlir::success();
}

mlir::LogicalResult HelpQuery::run(llvm::raw_ostream &os,
QuerySession &qs) const {
LogicalResult HelpQuery::run(llvm::raw_ostream &os, QuerySession &qs) const {
os << "Available commands:\n\n"
" match MATCHER, m MATCHER "
"Match the mlir against the given matcher.\n"
Expand All @@ -123,14 +119,12 @@ mlir::LogicalResult HelpQuery::run(llvm::raw_ostream &os,
return mlir::success();
}

mlir::LogicalResult QuitQuery::run(llvm::raw_ostream &os,
QuerySession &qs) const {
LogicalResult QuitQuery::run(llvm::raw_ostream &os, QuerySession &qs) const {
qs.terminate = true;
return mlir::success();
}

mlir::LogicalResult MatchQuery::run(llvm::raw_ostream &os,
QuerySession &qs) const {
LogicalResult MatchQuery::run(llvm::raw_ostream &os, QuerySession &qs) const {
Operation *rootOp = qs.getRootOp();
int matchCount = 0;
std::vector<Operation *> matches =
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Support/ToolUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "mlir/Support/ToolUtilities.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"

Expand Down
12 changes: 6 additions & 6 deletions mlir/lib/TableGen/CodeGenHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ StringRef StaticVerifierFunctionEmitter::getRegionConstraintFn(
/// Code for a type constraint. These may be called on the type of either
/// operands or results.
static const char *const typeConstraintCode = R"(
static ::mlir::LogicalResult {0}(
static ::llvm::LogicalResult {0}(
::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
unsigned valueIndex) {
if (!({1})) {
Expand All @@ -129,14 +129,14 @@ static ::mlir::LogicalResult {0}(
/// TODO: Unique constraints for adaptors. However, most Adaptor::verify
/// functions are stripped anyways.
static const char *const attrConstraintCode = R"(
static ::mlir::LogicalResult {0}(
static ::llvm::LogicalResult {0}(
::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {{
if (attr && !({1}))
return emitError() << "attribute '" << attrName
<< "' failed to satisfy constraint: {2}";
return ::mlir::success();
}
static ::mlir::LogicalResult {0}(
static ::llvm::LogicalResult {0}(
::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {{
return {0}(attr, attrName, [op]() {{
return op->emitOpError();
Expand All @@ -146,7 +146,7 @@ static ::mlir::LogicalResult {0}(

/// Code for a successor constraint.
static const char *const successorConstraintCode = R"(
static ::mlir::LogicalResult {0}(
static ::llvm::LogicalResult {0}(
::mlir::Operation *op, ::mlir::Block *successor,
::llvm::StringRef successorName, unsigned successorIndex) {
if (!({1})) {
Expand All @@ -160,7 +160,7 @@ static ::mlir::LogicalResult {0}(
/// Code for a region constraint. Callers will need to pass in the region's name
/// for emitting an error message.
static const char *const regionConstraintCode = R"(
static ::mlir::LogicalResult {0}(
static ::llvm::LogicalResult {0}(
::mlir::Operation *op, ::mlir::Region &region, ::llvm::StringRef regionName,
unsigned regionIndex) {
if (!({1})) {
Expand All @@ -176,7 +176,7 @@ static ::mlir::LogicalResult {0}(
///
/// {3}: "Type type" or "Attribute attr".
static const char *const patternAttrOrTypeConstraintCode = R"(
static ::mlir::LogicalResult {0}(
static ::llvm::LogicalResult {0}(
::mlir::PatternRewriter &rewriter, ::mlir::Operation *op, ::mlir::{3},
::llvm::StringRef failureStr) {
if (!({1})) {
Expand Down
4 changes: 2 additions & 2 deletions mlir/lib/Target/LLVMIR/Dialect/GPU/SelectObjectAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class LaunchKernel {
Value *createKernelArgArray(mlir::gpu::LaunchFuncOp op);

// Create the full kernel launch.
mlir::LogicalResult createKernelLaunch(mlir::gpu::LaunchFuncOp op,
llvm::LogicalResult createKernelLaunch(mlir::gpu::LaunchFuncOp op,
mlir::gpu::ObjectAttr object);

private:
Expand Down Expand Up @@ -345,7 +345,7 @@ llvm::LaunchKernel::createKernelArgArray(mlir::gpu::LaunchFuncOp op) {
// call %streamSynchronize(%4)
// call %streamDestroy(%4)
// call %moduleUnload(%1)
mlir::LogicalResult
llvm::LogicalResult
llvm::LaunchKernel::createKernelLaunch(mlir::gpu::LaunchFuncOp op,
mlir::gpu::ObjectAttr object) {
auto llvmValue = [&](mlir::Value value) -> Value * {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "mlir/Dialect/LLVMIR/NVVMDialect.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/Operation.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Target/LLVMIR/ModuleTranslation.h"

#include "llvm/IR/IRBuilder.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mlir/IR/IRMapping.h"
#include "mlir/IR/Operation.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Target/LLVMIR/Dialect/OpenMPCommon.h"
#include "mlir/Target/LLVMIR/ModuleTranslation.h"
#include "mlir/Transforms/RegionUtils.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "mlir/IR/DialectResourceBlobManager.h"
#include "mlir/IR/RegionGraphTraits.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Target/LLVMIR/LLVMTranslationInterface.h"
#include "mlir/Target/LLVMIR/TypeToLLVM.h"

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/Builders.h"
#include "mlir/IR/IRMapping.h"
#include "mlir/IR/Location.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Target/SPIRV/SPIRVBinaryUtils.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Sequence.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Target/SPIRV/Serialization/SerializeOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVEnums.h"
#include "mlir/IR/RegionGraphTraits.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Target/SPIRV/SPIRVBinaryUtils.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/StringExtras.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Target/SPIRV/Serialization/Serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVEnums.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVTypes.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Target/SPIRV/SPIRVBinaryUtils.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Sequence.h"
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Tools/PDLL/CodeGen/CPPGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ void CodeGen::generateConstraintOrRewrite(const ast::CallableDecl *decl,
// TODO: This will need to change if we allow Constraints to return values as
// well.
if (isConstraint) {
os << "::mlir::LogicalResult";
os << "::llvm::LogicalResult";
} else {
// Otherwise, generate a type based on the results of the callable.
// If the callable has explicit results, use those to build the result.
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Tools/PDLL/Parser/Lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "Lexer.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Tools/PDLL/AST/Diagnostic.h"
#include "mlir/Tools/PDLL/Parser/CodeComplete.h"
#include "llvm/ADT/StringExtras.h"
Expand Down
2 changes: 0 additions & 2 deletions mlir/lib/Tools/PDLL/Parser/Lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class SourceMgr;
} // namespace llvm

namespace mlir {
struct LogicalResult;

namespace pdll {
class CodeCompleteContext;

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Tools/PDLL/Parser/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "mlir/Tools/PDLL/Parser/Parser.h"
#include "Lexer.h"
#include "mlir/Support/IndentedOstream.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/TableGen/Argument.h"
#include "mlir/TableGen/Attribute.h"
#include "mlir/TableGen/Constraint.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Tools/lsp-server-support/Protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//===----------------------------------------------------------------------===//

#include "mlir/Tools/lsp-server-support/Protocol.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Tools/lsp-server-support/Logging.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/SmallString.h"
Expand Down
7 changes: 5 additions & 2 deletions mlir/lib/Tools/mlir-lsp-server/LSPServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@

#include <memory>

namespace mlir {
namespace llvm {
struct LogicalResult;
} // namespace llvm

namespace mlir {
namespace lsp {
class JSONTransport;
class MLIRServer;

/// Run the main loop of the LSP server using the given MLIR server and
/// transport.
LogicalResult runMlirLSPServer(MLIRServer &server, JSONTransport &transport);
llvm::LogicalResult runMlirLSPServer(MLIRServer &server,
JSONTransport &transport);
} // namespace lsp
} // namespace mlir

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Support/FileUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/Timing.h"
#include "mlir/Support/ToolUtilities.h"
#include "mlir/Tools/ParseUtilities.h"
Expand Down
7 changes: 5 additions & 2 deletions mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@

#include <memory>

namespace mlir {
namespace llvm {
struct LogicalResult;
} // namespace llvm

namespace mlir {
namespace lsp {
class JSONTransport;
class PDLLServer;

/// Run the main loop of the LSP server using the given PDLL server and
/// transport.
LogicalResult runPdllLSPServer(PDLLServer &server, JSONTransport &transport);
llvm::LogicalResult runPdllLSPServer(PDLLServer &server,
JSONTransport &transport);

} // namespace lsp
} // namespace mlir
Expand Down
3 changes: 2 additions & 1 deletion mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include <memory>
#include <string>
#include <optional>
#include <string>
#include <vector>

namespace mlir {
namespace lsp {
Expand Down
3 changes: 1 addition & 2 deletions mlir/lib/Tools/mlir-query/MlirQueryMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mlir/Query/Query.h"
#include "mlir/Query/QuerySession.h"
#include "mlir/Support/FileUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/LineEditor/LineEditor.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/InitLLVM.h"
Expand All @@ -28,7 +27,7 @@
// Query Parser
//===----------------------------------------------------------------------===//

mlir::LogicalResult
llvm::LogicalResult
mlir::mlirQueryMain(int argc, char **argv, MLIRContext &context,
const mlir::query::matcher::Registry &matcherRegistry) {

Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Tools/mlir-reduce/MlirReduceMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mlir/Reducer/Passes.h"
#include "mlir/Rewrite/FrozenRewritePatternSet.h"
#include "mlir/Support/FileUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Tools/ParseUtilities.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/SourceMgr.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "mlir/IR/Verifier.h"
#include "mlir/Parser/Parser.h"
#include "mlir/Support/FileUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/Timing.h"
#include "mlir/Support/ToolUtilities.h"
#include "mlir/Tools/mlir-translate/Translation.h"
Expand Down
8 changes: 5 additions & 3 deletions mlir/lib/Tools/tblgen-lsp-server/LSPServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@

#include <memory>

namespace mlir {
namespace llvm {
struct LogicalResult;
} // namespace llvm

namespace mlir {
namespace lsp {
class JSONTransport;
class TableGenServer;

/// Run the main loop of the LSP server using the given TableGen server and
/// transport.
LogicalResult runTableGenLSPServer(TableGenServer &server,
JSONTransport &transport);
llvm::LogicalResult runTableGenLSPServer(TableGenServer &server,
JSONTransport &transport);

} // namespace lsp
} // namespace mlir
Expand Down
4 changes: 0 additions & 4 deletions mlir/lib/Tools/tblgen-lsp-server/TableGenServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@
#include "TableGenServer.h"

#include "mlir/Support/IndentedOstream.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Tools/lsp-server-support/CompilationDatabase.h"
#include "mlir/Tools/lsp-server-support/Logging.h"
#include "mlir/Tools/lsp-server-support/Protocol.h"
#include "mlir/Tools/lsp-server-support/SourceMgrUtils.h"
#include "llvm/ADT/IntervalMap.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/TableGen/Parser.h"
#include "llvm/TableGen/Record.h"
Expand Down
3 changes: 2 additions & 1 deletion mlir/lib/Tools/tblgen-lsp-server/TableGenServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include <memory>
#include <string>
#include <optional>
#include <string>
#include <vector>

namespace mlir {
namespace lsp {
Expand Down
1 change: 0 additions & 1 deletion mlir/test/lib/Analysis/DataFlow/TestLivenessAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <mlir/Pass/Pass.h>
#include <mlir/Pass/PassRegistry.h>
#include <mlir/Support/LLVM.h>
#include <mlir/Support/LogicalResult.h>
#include <mlir/Support/TypeID.h>

using namespace mlir;
Expand Down
1 change: 0 additions & 1 deletion mlir/test/lib/Dialect/ArmNeon/TestLowerToArmNeon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"

#define PASS_NAME "test-lower-to-arm-neon"
Expand Down
1 change: 0 additions & 1 deletion mlir/test/lib/Dialect/Mesh/TestOpLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "mlir/Dialect/Utils/IndexingUtils.h"
#include "mlir/IR/SymbolTable.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"

using namespace mlir;
Expand Down
1 change: 0 additions & 1 deletion mlir/test/lib/Dialect/Mesh/TestReshardingSpmdization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mlir/IR/SymbolTable.h"
#include "mlir/IR/Value.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"

using namespace mlir;
Expand Down
1 change: 0 additions & 1 deletion mlir/test/lib/Dialect/Test/TestAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/ExtensibleDialect.h"
#include "mlir/IR/Types.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/StringExtras.h"
Expand Down
1 change: 0 additions & 1 deletion mlir/test/lib/Dialect/Test/TestDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "mlir/Interfaces/FunctionImplementation.h"
#include "mlir/Interfaces/InferIntRangeInterface.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/FoldUtils.h"
#include "mlir/Transforms/InliningUtils.h"
#include "llvm/ADT/STLFunctionalExtras.h"
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/lib/Dialect/Test/TestOpDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ void TestVersionedOpA::writeProperties(mlir::DialectBytecodeWriter &writer) {
// TestOpWithVersionedProperties
//===----------------------------------------------------------------------===//

mlir::LogicalResult TestOpWithVersionedProperties::readFromMlirBytecode(
llvm::LogicalResult TestOpWithVersionedProperties::readFromMlirBytecode(
mlir::DialectBytecodeReader &reader, test::VersionedProperties &prop) {
uint64_t value1, value2 = 0;
if (failed(reader.readVarInt(value1)))
Expand Down
10 changes: 5 additions & 5 deletions mlir/test/lib/Dialect/Test/TestOps.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct PropertiesWithCustomPrint {
}
};

mlir::LogicalResult setPropertiesFromAttribute(
llvm::LogicalResult setPropertiesFromAttribute(
PropertiesWithCustomPrint &prop, mlir::Attribute attr,
llvm::function_ref<mlir::InFlightDiagnostic()> emitError);
mlir::DictionaryAttr
Expand All @@ -92,7 +92,7 @@ class MyPropStruct {
// These three methods are invoked through the `MyStructProperty` wrapper
// defined in TestOps.td
mlir::Attribute asAttribute(mlir::MLIRContext *ctx) const;
static mlir::LogicalResult
static llvm::LogicalResult
setFromAttr(MyPropStruct &prop, mlir::Attribute attr,
llvm::function_ref<mlir::InFlightDiagnostic()> emitError);
llvm::hash_code hash() const;
Expand All @@ -101,7 +101,7 @@ class MyPropStruct {
}
};

mlir::LogicalResult readFromMlirBytecode(mlir::DialectBytecodeReader &reader,
llvm::LogicalResult readFromMlirBytecode(mlir::DialectBytecodeReader &reader,
MyPropStruct &prop);
void writeToMlirBytecode(mlir::DialectBytecodeWriter &writer,
MyPropStruct &prop);
Expand All @@ -122,7 +122,7 @@ struct VersionedProperties {
}
};

mlir::LogicalResult setPropertiesFromAttribute(
llvm::LogicalResult setPropertiesFromAttribute(
VersionedProperties &prop, mlir::Attribute attr,
llvm::function_ref<mlir::InFlightDiagnostic()> emitError);
mlir::DictionaryAttr getPropertiesAsAttribute(mlir::MLIRContext *ctx,
Expand All @@ -137,7 +137,7 @@ mlir::ParseResult customParseProperties(mlir::OpAsmParser &parser,
// Bytecode Support
//===----------------------------------------------------------------------===//

mlir::LogicalResult readFromMlirBytecode(mlir::DialectBytecodeReader &reader,
llvm::LogicalResult readFromMlirBytecode(mlir::DialectBytecodeReader &reader,
llvm::MutableArrayRef<int64_t> prop);
void writeToMlirBytecode(mlir::DialectBytecodeWriter &writer,
llvm::ArrayRef<int64_t> prop);
Expand Down
12 changes: 6 additions & 6 deletions mlir/test/lib/Dialect/Test/TestOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def VariadicRegionInferredTypesOp : TEST_Op<"variadic_region_inferred",
let results = (outs Variadic<AnyType>);

let extraClassDeclaration = [{
static mlir::LogicalResult inferReturnTypes(mlir::MLIRContext *context,
static llvm::LogicalResult inferReturnTypes(mlir::MLIRContext *context,
std::optional<::mlir::Location> location, mlir::ValueRange operands,
mlir::DictionaryAttr attributes, mlir::OpaqueProperties properties, mlir::RegionRange regions,
llvm::SmallVectorImpl<mlir::Type> &inferredReturnTypes) {
Expand Down Expand Up @@ -1368,7 +1368,7 @@ def TestOpInPlaceFoldSuccess : TEST_Op<"op_in_place_fold_success"> {
let results = (outs Variadic<I1>);
let hasFolder = 1;
let extraClassDefinition = [{
::mlir::LogicalResult $cppClass::fold(FoldAdaptor adaptor,
::llvm::LogicalResult $cppClass::fold(FoldAdaptor adaptor,
SmallVectorImpl<OpFoldResult> &results) {
return success();
}
Expand Down Expand Up @@ -2408,7 +2408,7 @@ class TableGenBuildInferReturnTypeBaseOp<string mnemonic,
let results = (outs AnyType:$result);

let extraClassDeclaration = [{
static ::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *,
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *,
::std::optional<::mlir::Location> location, ::mlir::ValueRange operands,
::mlir::DictionaryAttr attributes, mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
Expand Down Expand Up @@ -3037,15 +3037,15 @@ def TestOpWithNiceProperties : TEST_Op<"with_nice_properties"> {
::mlir::ArrayRef<::llvm::StringRef> elidedProps);
static ::mlir::ParseResult parseProperties(::mlir::OpAsmParser &parser,
::mlir::OperationState &result);
static ::mlir::LogicalResult readFromMlirBytecode(
static ::llvm::LogicalResult readFromMlirBytecode(
::mlir::DialectBytecodeReader &,
test::PropertiesWithCustomPrint &prop);
static void writeToMlirBytecode(
::mlir::DialectBytecodeWriter &,
const test::PropertiesWithCustomPrint &prop);
}];
let extraClassDefinition = [{
::mlir::LogicalResult TestOpWithNiceProperties::readFromMlirBytecode(
::llvm::LogicalResult TestOpWithNiceProperties::readFromMlirBytecode(
::mlir::DialectBytecodeReader &reader,
test::PropertiesWithCustomPrint &prop) {
StringRef label;
Expand Down Expand Up @@ -3101,7 +3101,7 @@ def TestOpWithVersionedProperties : TEST_Op<"with_versioned_properties"> {
::mlir::ArrayRef<::llvm::StringRef> elidedProps);
static ::mlir::ParseResult parseProperties(::mlir::OpAsmParser &parser,
::mlir::OperationState &result);
static ::mlir::LogicalResult readFromMlirBytecode(
static ::llvm::LogicalResult readFromMlirBytecode(
::mlir::DialectBytecodeReader &,
test::VersionedProperties &prop);
static void writeToMlirBytecode(
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/lib/Dialect/Test/TestOpsSyntax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ void ParseB64BytesOp::print(OpAsmPrinter &p) {
p << " \"" << llvm::encodeBase64(getB64()) << "\"";
}

::mlir::LogicalResult FormatInferType2Op::inferReturnTypes(
::llvm::LogicalResult FormatInferType2Op::inferReturnTypes(
::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location,
::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes,
OpaqueProperties properties, ::mlir::RegionRange regions,
Expand Down
8 changes: 4 additions & 4 deletions mlir/test/lib/Dialect/Test/TestOpsSyntax.td
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ def FormatInferTypeOp : TEST_Op<"format_infer_type", [InferTypeOpInterface]> {
let assemblyFormat = "attr-dict";

let extraClassDeclaration = [{
static ::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context,
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context,
::std::optional<::mlir::Location> location, ::mlir::ValueRange operands,
::mlir::DictionaryAttr attributes, mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
Expand All @@ -655,7 +655,7 @@ class FormatInferAllTypesBaseOp<string mnemonic, list<Trait> traits = []>
let arguments = (ins Variadic<AnyType>:$args);
let results = (outs Variadic<AnyType>:$outs);
let extraClassDeclaration = [{
static ::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context,
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context,
::std::optional<::mlir::Location> location, ::mlir::ValueRange operands,
::mlir::DictionaryAttr attributes, mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
Expand Down Expand Up @@ -702,7 +702,7 @@ def FormatInferTypeRegionsOp
let regions = (region AnyRegion:$region);
let assemblyFormat = "$region attr-dict";
let extraClassDeclaration = [{
static ::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context,
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context,
::std::optional<::mlir::Location> location, ::mlir::ValueRange operands,
::mlir::DictionaryAttr attributes, mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
Expand All @@ -723,7 +723,7 @@ def FormatInferTypeVariadicOperandsOp
let results = (outs Variadic<AnyType>:$outs);
let assemblyFormat = "`(` $a `:` type($a) `)` `(` $b `:` type($b) `)` attr-dict";
let extraClassDeclaration = [{
static ::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context,
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context,
::std::optional<::mlir::Location> location, ::mlir::ValueRange operands,
::mlir::DictionaryAttr attributes, mlir::OpaqueProperties properties, ::mlir::RegionRange regions,
::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes) {
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/lib/Dialect/Test/TestTypeDefs.td
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def TestTypeWithLayoutType : Test_Type<"TestTypeWithLayout", [
let mnemonic = "test_type_with_layout";
let parameters = (ins "unsigned":$key);
let extraClassDeclaration = [{
::mlir::LogicalResult verifyEntries(::mlir::DataLayoutEntryListRef params,
::llvm::LogicalResult verifyEntries(::mlir::DataLayoutEntryListRef params,
::mlir::Location loc) const;

private:
Expand Down
4 changes: 2 additions & 2 deletions mlir/test/lib/Dialect/Test/TestTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct TestRecursiveTypeStorage : public ::mlir::TypeStorage {
TestRecursiveTypeStorage(allocator.copyInto(key));
}

::mlir::LogicalResult mutate(::mlir::TypeStorageAllocator &allocator,
::llvm::LogicalResult mutate(::mlir::TypeStorageAllocator &allocator,
::mlir::Type newBody) {
// Cannot set a different body than before.
if (body && body != newBody)
Expand Down Expand Up @@ -140,7 +140,7 @@ class TestRecursiveType
}

/// Body getter and setter.
::mlir::LogicalResult setBody(Type body) { return Base::mutate(body); }
::llvm::LogicalResult setBody(Type body) { return Base::mutate(body); }
::mlir::Type getBody() const { return getImpl()->body; }

/// Name/key getter.
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/mlir-pdll/CodeGen/CPP/general.pdll
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Pattern => erase op<test.op3>;

#include "include/ods.td"

// CHECK: static ::mlir::LogicalResult TestCstPDLFn(::mlir::PatternRewriter &rewriter,
// CHECK: static ::llvm::LogicalResult TestCstPDLFn(::mlir::PatternRewriter &rewriter,
// CHECK-SAME: ::mlir::Attribute attr, ::mlir::Operation * op, ::mlir::Type type,
// CHECK-SAME: ::mlir::Value value, ::mlir::TypeRange typeRange, ::mlir::ValueRange valueRange) {
// CHECK-NEXT: return success();
Expand Down
Loading