Skip to content

Commit ec33c68

Browse files
authored
Revert "Reland yet again: [mlir] Add FP software implementation lowering pass…"
This reverts commit 0bba1e7.
1 parent 99a726e commit ec33c68

File tree

17 files changed

+0
-552
lines changed

17 files changed

+0
-552
lines changed

mlir/include/mlir/Conversion/ArithToAPFloat/ArithToAPFloat.h

Lines changed: 0 additions & 21 deletions
This file was deleted.

mlir/include/mlir/Conversion/Passes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "mlir/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.h"
1313
#include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
1414
#include "mlir/Conversion/ArithToAMDGPU/ArithToAMDGPU.h"
15-
#include "mlir/Conversion/ArithToAPFloat/ArithToAPFloat.h"
1615
#include "mlir/Conversion/ArithToArmSME/ArithToArmSME.h"
1716
#include "mlir/Conversion/ArithToEmitC/ArithToEmitCPass.h"
1817
#include "mlir/Conversion/ArithToLLVM/ArithToLLVM.h"

mlir/include/mlir/Conversion/Passes.td

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -186,21 +186,6 @@ def ArithToLLVMConversionPass : Pass<"convert-arith-to-llvm"> {
186186
];
187187
}
188188

189-
//===----------------------------------------------------------------------===//
190-
// ArithToAPFloat
191-
//===----------------------------------------------------------------------===//
192-
193-
def ArithToAPFloatConversionPass
194-
: Pass<"convert-arith-to-apfloat", "ModuleOp"> {
195-
let summary = "Convert Arith ops to APFloat runtime library calls";
196-
let description = [{
197-
This pass converts supported Arith ops to APFloat-based runtime library
198-
calls (APFloatWrappers.cpp). APFloat is a software implementation of
199-
floating-point arithmetic operations.
200-
}];
201-
let dependentDialects = ["func::FuncDialect"];
202-
}
203-
204189
//===----------------------------------------------------------------------===//
205190
// ArithToSPIRV
206191
//===----------------------------------------------------------------------===//

mlir/include/mlir/Dialect/Func/Utils/Utils.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ mlir::FailureOr<std::pair<mlir::func::FuncOp, mlir::func::CallOp>>
6060
deduplicateArgsOfFuncOp(mlir::RewriterBase &rewriter, mlir::func::FuncOp funcOp,
6161
mlir::ModuleOp moduleOp);
6262

63-
/// Look up a FuncOp with signature `resultTypes`(`paramTypes`)` and name
64-
/// `name`. Return a failure if the FuncOp is found but with a different
65-
/// signature.
66-
FailureOr<FuncOp> lookupFnDecl(SymbolOpInterface symTable, StringRef name,
67-
FunctionType funcT,
68-
SymbolTableCollection *symbolTables = nullptr);
69-
7063
} // namespace func
7164
} // namespace mlir
7265

mlir/include/mlir/Dialect/LLVMIR/FunctionCallUtils.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ lookupOrCreatePrintF32Fn(OpBuilder &b, Operation *moduleOp,
5252
FailureOr<LLVM::LLVMFuncOp>
5353
lookupOrCreatePrintF64Fn(OpBuilder &b, Operation *moduleOp,
5454
SymbolTableCollection *symbolTables = nullptr);
55-
FailureOr<LLVM::LLVMFuncOp>
56-
lookupOrCreateApFloatPrintFn(OpBuilder &b, Operation *moduleOp,
57-
SymbolTableCollection *symbolTables = nullptr);
58-
5955
/// Declares a function to print a C-string.
6056
/// If a custom runtime function is defined via `runtimeFunctionName`, it must
6157
/// have the signature void(char const*). The default function is `printString`.

mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp

Lines changed: 0 additions & 163 deletions
This file was deleted.

mlir/lib/Conversion/ArithToAPFloat/CMakeLists.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.

mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "mlir/Conversion/LLVMCommon/VectorPattern.h"
1515
#include "mlir/Dialect/Arith/IR/Arith.h"
1616
#include "mlir/Dialect/Arith/Transforms/Passes.h"
17-
#include "mlir/Dialect/LLVMIR/FunctionCallUtils.h"
1817
#include "mlir/Dialect/LLVMIR/LLVMAttrs.h"
1918
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
2019
#include "mlir/IR/TypeUtilities.h"

mlir/lib/Conversion/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ add_subdirectory(AffineToStandard)
22
add_subdirectory(AMDGPUToROCDL)
33
add_subdirectory(ArithCommon)
44
add_subdirectory(ArithToAMDGPU)
5-
add_subdirectory(ArithToAPFloat)
65
add_subdirectory(ArithToArmSME)
76
add_subdirectory(ArithToEmitC)
87
add_subdirectory(ArithToLLVM)

mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,20 +1654,6 @@ class VectorPrintOpConversion : public ConvertOpToLLVMPattern<vector::PrintOp> {
16541654
return failure();
16551655
}
16561656
}
1657-
} else if (auto floatTy = dyn_cast<FloatType>(printType)) {
1658-
// Print other floating-point types using the APFloat runtime library.
1659-
int32_t sem =
1660-
llvm::APFloatBase::SemanticsToEnum(floatTy.getFloatSemantics());
1661-
Value semValue = LLVM::ConstantOp::create(
1662-
rewriter, loc, rewriter.getI32Type(),
1663-
rewriter.getIntegerAttr(rewriter.getI32Type(), sem));
1664-
Value floatBits =
1665-
LLVM::ZExtOp::create(rewriter, loc, rewriter.getI64Type(), value);
1666-
printer =
1667-
LLVM::lookupOrCreateApFloatPrintFn(rewriter, parent, symbolTables);
1668-
emitCall(rewriter, loc, printer.value(),
1669-
ValueRange({semValue, floatBits}));
1670-
return success();
16711657
} else {
16721658
return failure();
16731659
}

0 commit comments

Comments
 (0)