@@ -45,6 +45,15 @@ void LoadOp::build(OpBuilder &builder, OperationState &state, Value ptr,
4545 cache, evict, isVolatile);
4646}
4747
48+ // implementatio with flagtree_hints
49+ void LoadOp::build (OpBuilder &builder, OperationState &state, Value ptr,
50+ CacheModifier cache, EvictionPolicy evict, bool isVolatile,
51+ mlir::StringAttr flagtree_hints) {
52+ LoadOp::build (builder, state, ptr, /* mask=*/ {}, /* other=*/ {},
53+ /* boundaryCheck=*/ ArrayRef<int32_t >{}, /* padding=*/ std::nullopt ,
54+ cache, evict, isVolatile, flagtree_hints);
55+ }
56+
4857void LoadOp::build (OpBuilder &builder, OperationState &state, Value ptr,
4958 ArrayRef<int32_t > boundaryCheck,
5059 std::optional<PaddingOption> padding, CacheModifier cache,
@@ -53,6 +62,16 @@ void LoadOp::build(OpBuilder &builder, OperationState &state, Value ptr,
5362 padding, cache, evict, isVolatile);
5463}
5564
65+ // implementatio with flagtree_hints
66+ void LoadOp::build (OpBuilder &builder, OperationState &state, Value ptr,
67+ ArrayRef<int32_t > boundaryCheck,
68+ std::optional<PaddingOption> padding, CacheModifier cache,
69+ EvictionPolicy evict, bool isVolatile,
70+ mlir::StringAttr flagtree_hints) {
71+ LoadOp::build (builder, state, ptr, /* mask=*/ {}, /* other=*/ {}, boundaryCheck,
72+ padding, cache, evict, isVolatile, flagtree_hints);
73+ }
74+
5675void LoadOp::build (OpBuilder &builder, OperationState &state, Value ptr,
5776 Value mask, CacheModifier cache, EvictionPolicy evict,
5877 bool isVolatile) {
@@ -61,6 +80,16 @@ void LoadOp::build(OpBuilder &builder, OperationState &state, Value ptr,
6180 /* padding=*/ std::nullopt , cache, evict, isVolatile);
6281}
6382
83+ // implementatio with flagtree_hints
84+ void LoadOp::build (OpBuilder &builder, OperationState &state, Value ptr,
85+ Value mask, CacheModifier cache, EvictionPolicy evict,
86+ bool isVolatile, mlir::StringAttr flagtree_hints) {
87+ LoadOp::build (builder, state, ptr, mask, /* other=*/ {},
88+ /* boundaryCheck=*/ ArrayRef<int32_t >{},
89+ /* padding=*/ std::nullopt , cache, evict, isVolatile,
90+ flagtree_hints);
91+ }
92+
6493void LoadOp::build (OpBuilder &builder, OperationState &state, Value ptr,
6594 Value mask, Value other, CacheModifier cache,
6695 EvictionPolicy evict, bool isVolatile) {
@@ -69,6 +98,17 @@ void LoadOp::build(OpBuilder &builder, OperationState &state, Value ptr,
6998 /* padding=*/ std::nullopt , cache, evict, isVolatile);
7099}
71100
101+ // implementatio with flagtree_hints
102+ void LoadOp::build (OpBuilder &builder, OperationState &state, Value ptr,
103+ Value mask, Value other, CacheModifier cache,
104+ EvictionPolicy evict, bool isVolatile,
105+ mlir::StringAttr flagtree_hints) {
106+ LoadOp::build (builder, state, ptr, mask, other,
107+ /* boundaryCheck=*/ ArrayRef<int32_t >{},
108+ /* padding=*/ std::nullopt , cache, evict, isVolatile,
109+ flagtree_hints);
110+ }
111+
72112void LoadOp::build (OpBuilder &builder, OperationState &state, Value ptr,
73113 Value mask, Value other, ArrayRef<int32_t > boundaryCheck,
74114 std::optional<PaddingOption> padding, CacheModifier cache,
@@ -82,6 +122,21 @@ void LoadOp::build(OpBuilder &builder, OperationState &state, Value ptr,
82122 evict, isVolatile);
83123}
84124
125+ // implementatio with flagtree_hints
126+ void LoadOp::build (OpBuilder &builder, OperationState &state, Value ptr,
127+ Value mask, Value other, ArrayRef<int32_t > boundaryCheck,
128+ std::optional<PaddingOption> padding, CacheModifier cache,
129+ EvictionPolicy evict, bool isVolatile,
130+ mlir::StringAttr flagtree_hints) {
131+ auto paddingAttr =
132+ padding.has_value ()
133+ ? PaddingOptionAttr::get (builder.getContext (), padding.value ())
134+ : PaddingOptionAttr ();
135+ LoadOp::build (builder, state, ptr, mask, other,
136+ builder.getDenseI32ArrayAttr (boundaryCheck), paddingAttr, cache,
137+ evict, isVolatile, flagtree_hints);
138+ }
139+
85140// load(ptr, splat(1), ...) -> load(ptr, ...)
86141// load(ptr, splat(0), other, ...) -> other
87142struct CanonicalizeMaskedLoadPattern : public OpRewritePattern <LoadOp> {
0 commit comments