mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 11:39:35 +00:00
Remove let construct =
from ArithExpandOpsPass definition (NFC)
Note that the `Pass` suffix is added in tablegen, and as a side effect the options are renamed from `ArithExpandOpsOptions` to `ArithExpandOpsPassOptions`.
This commit is contained in:
parent
b1c10dfd72
commit
b97aaa72d9
@ -63,13 +63,6 @@ void populateExpandBFloat16Patterns(RewritePatternSet &patterns);
|
||||
/// Add patterns to expand Arith ops.
|
||||
void populateArithExpandOpsPatterns(RewritePatternSet &patterns);
|
||||
|
||||
/// Create a pass to legalize Arith ops.
|
||||
std::unique_ptr<Pass> createArithExpandOpsPass();
|
||||
|
||||
/// Create a pass to legalize Arith ops with specified configuration.
|
||||
std::unique_ptr<Pass>
|
||||
createArithExpandOpsPass(const ArithExpandOpsOptions &options);
|
||||
|
||||
/// Create a pass to replace signed ops with unsigned ones where they are proven
|
||||
/// equivalent.
|
||||
std::unique_ptr<Pass> createArithUnsignedWhenEquivalentPass();
|
||||
|
@ -27,9 +27,8 @@ def ArithBufferizePass : Pass<"arith-bufferize", "ModuleOp"> {
|
||||
];
|
||||
}
|
||||
|
||||
def ArithExpandOps : Pass<"arith-expand"> {
|
||||
def ArithExpandOpsPass : Pass<"arith-expand"> {
|
||||
let summary = "Legalize Arith ops to be convertible to LLVM.";
|
||||
let constructor = "mlir::arith::createArithExpandOpsPass()";
|
||||
let dependentDialects = ["vector::VectorDialect"];
|
||||
let options = [
|
||||
Option<"includeBf16", "include-bf16", "bool", /*default=*/"false",
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
namespace mlir {
|
||||
namespace arith {
|
||||
#define GEN_PASS_DEF_ARITHEXPANDOPS
|
||||
#define GEN_PASS_DEF_ARITHEXPANDOPSPASS
|
||||
#include "mlir/Dialect/Arith/Transforms/Passes.h.inc"
|
||||
} // namespace arith
|
||||
} // namespace mlir
|
||||
@ -303,11 +303,8 @@ struct BFloat16TruncFOpConverter : public OpRewritePattern<arith::TruncFOp> {
|
||||
};
|
||||
|
||||
struct ArithExpandOpsPass
|
||||
: public arith::impl::ArithExpandOpsBase<ArithExpandOpsPass> {
|
||||
ArithExpandOpsPass() = default;
|
||||
ArithExpandOpsPass(const arith::ArithExpandOpsOptions& options) {
|
||||
this->includeBf16 = options.includeBf16;
|
||||
}
|
||||
: public arith::impl::ArithExpandOpsPassBase<ArithExpandOpsPass> {
|
||||
using ArithExpandOpsPassBase::ArithExpandOpsPassBase;
|
||||
|
||||
void runOnOperation() override {
|
||||
RewritePatternSet patterns(&getContext());
|
||||
@ -372,12 +369,3 @@ void mlir::arith::populateArithExpandOpsPatterns(RewritePatternSet &patterns) {
|
||||
>(patterns.getContext());
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
std::unique_ptr<Pass> mlir::arith::createArithExpandOpsPass() {
|
||||
return std::make_unique<ArithExpandOpsPass>();
|
||||
}
|
||||
|
||||
std::unique_ptr<Pass> mlir::arith::createArithExpandOpsPass(
|
||||
const ArithExpandOpsOptions& options) {
|
||||
return std::make_unique<ArithExpandOpsPass>(options);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user