aboutsummaryrefslogtreecommitdiff
path: root/clang/lib
diff options
context:
space:
mode:
authorHenrich Lauko <xlauko@mail.muni.cz>2025-05-02 09:21:26 +0200
committerGitHub <noreply@github.com>2025-05-02 09:21:26 +0200
commitff28e1a5a92da380c2869aba09971687c26d2f0f (patch)
tree5aea3f4c841b8b9df5f440dc6faf2b202a39eb35 /clang/lib
parent3f367a65d31a7178e222a7babae7baa0a93ff292 (diff)
downloadllvm-ff28e1a5a92da380c2869aba09971687c26d2f0f.zip
llvm-ff28e1a5a92da380c2869aba09971687c26d2f0f.tar.gz
llvm-ff28e1a5a92da380c2869aba09971687c26d2f0f.tar.bz2
[CIR] Refactor floating point type constraints (#138112)
- This cleans up moves cir floating point type constraints to dedicated constraints file, and fixes long double verifier to use constraints directly. - Renames `CIR_AnyFloat` to `CIR_AnyFloatType`. This mirrors inbubator changes from https://github.com/llvm/clangir/pull/1594
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CIR/Dialect/IR/CIRTypes.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/clang/lib/CIR/Dialect/IR/CIRTypes.cpp b/clang/lib/CIR/Dialect/IR/CIRTypes.cpp
index 7d960c2..9a44f92 100644
--- a/clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+++ b/clang/lib/CIR/Dialect/IR/CIRTypes.cpp
@@ -550,26 +550,6 @@ LongDoubleType::getABIAlignment(const mlir::DataLayout &dataLayout,
.getABIAlignment(dataLayout, params);
}
-LogicalResult
-LongDoubleType::verify(function_ref<InFlightDiagnostic()> emitError,
- mlir::Type underlying) {
- if (!mlir::isa<DoubleType, FP80Type, FP128Type>(underlying)) {
- emitError() << "invalid underlying type for long double";
- return failure();
- }
-
- return success();
-}
-
-//===----------------------------------------------------------------------===//
-// Floating-point type helpers
-//===----------------------------------------------------------------------===//
-
-bool cir::isAnyFloatingPointType(mlir::Type t) {
- return isa<cir::SingleType, cir::DoubleType, cir::LongDoubleType,
- cir::FP80Type, cir::BF16Type, cir::FP16Type, cir::FP128Type>(t);
-}
-
//===----------------------------------------------------------------------===//
// Floating-point and Float-point Vector type helpers
//===----------------------------------------------------------------------===//