#include "mlir/Dialect/Linalg/IR/LinalgOps.h"
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Linalg, linalg,
- mlir::linalg::LinalgDialect);
+ mlir::linalg::LinalgDialect)
#include "mlir-c/Dialect/SCF.h"
#include "mlir/CAPI/Registration.h"
-MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(SCF, scf, mlir::scf::SCFDialect);
+MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(SCF, scf, mlir::scf::SCFDialect)
#include "mlir-c/Dialect/Shape.h"
#include "mlir/CAPI/Registration.h"
-MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Shape, shape, mlir::shape::ShapeDialect);
+MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Shape, shape, mlir::shape::ShapeDialect)
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
-MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Standard, std, mlir::StandardOpsDialect);
+MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Standard, std, mlir::StandardOpsDialect)
#include "mlir/CAPI/Registration.h"
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Tensor, tensor,
- mlir::tensor::TensorDialect);
+ mlir::tensor::TensorDialect)
case Kind::kAddI:
return merger.takeDisj(kind, s0, s1);
}
+ llvm_unreachable("unexpected expression kind");
}
/// Maps sparse integer option to actual integral storage type.
case linalg::SparseIntType::kI32:
return rewriter.getIntegerType(32);
}
+ llvm_unreachable("unexpected SparseIntType");
}
/// Local bufferization of all dense and sparse data structures.
case Kind::kAddI:
return rewriter.create<AddIOp>(op.getLoc(), v0, v1);
}
+ llvm_unreachable("unexpected expression kind");
}
/// Hoists loop invariant tensor loads for which indices have been exhausted.
case linalg::SparseVectorizationStrategy::kAnyStorageInnerLoop:
return isInner;
}
+ llvm_unreachable("unexpected vectorization strategy");
}
/// Returns parallelization strategy. Any implicit loop in the Linalg operation
case linalg::SparseParallelizationStrategy::kAnyStorageAnyLoop:
return !isReduction && !isVector;
}
+ llvm_unreachable("unexpected parallelization strategy");
}
/// Generates a for-loop on a single index.
double value;
for (uint64_t k = 0; k < nnz; k++) {
for (uint64_t r = 0; r < rank; r++) {
- if (fscanf(file, "%" PRIu64, &indices[r]) != 1) {
+ if (fscanf(file, "%" PRId64, &indices[r]) != 1) {
fprintf(stderr, "Cannot find next index in %s\n", filename);
exit(1);
}
case PDLValueKind::Value:
return read<Value>();
}
+ llvm_unreachable("unhandled PDLValueKind");
}
template <typename T>
std::enable_if_t<std::is_same<T, ByteCodeAddr>::value, T> readImpl() {
lastWasPunctuation);
// Emit a whitespace element.
- if (NewlineElement *newline = dyn_cast<NewlineElement>(element)) {
+ if (isa<NewlineElement>(element)) {
body << " p.printNewline();\n";
return;
}
"is", "lambda", "nonlocal", "not", "or", "pass",
"raise", "return", "try", "while", "with", "yield"});
return keywords.contains(str);
-};
+}
/// Checks whether `str` would shadow a generated variable or attribute
/// part of the OpView API.