@@ -147,15 +147,15 @@ class EffectInstance {
147147 effectOnFullRegion(effectOnFullRegion) {}
148148 template <typename T,
149149 std::enable_if_t <
150- llvm::is_one_of<T, OpOperand *, OpResult, BlockArgument>::value,
150+ llvm::is_one_of<T, OpOperand *, OpResult, BlockArgument, Value >::value,
151151 bool > = true >
152152 EffectInstance (EffectT *effect, T value,
153153 Resource *resource = DefaultResource::get())
154154 : effect(effect), resource(resource), value(value), stage(0 ),
155155 effectOnFullRegion(false ) {}
156156 template <typename T,
157157 std::enable_if_t <
158- llvm::is_one_of<T, OpOperand *, OpResult, BlockArgument>::value,
158+ llvm::is_one_of<T, OpOperand *, OpResult, BlockArgument, Value >::value,
159159 bool > = true >
160160 EffectInstance (EffectT *effect, T value, int stage, bool effectOnFullRegion,
161161 Resource *resource = DefaultResource::get())
@@ -223,6 +223,9 @@ class EffectInstance {
223223 if (OpResult result = llvm::dyn_cast_if_present<OpResult>(value)) {
224224 return result;
225225 }
226+ if (Value result = llvm::dyn_cast_if_present<Value>(value)) {
227+ return result;
228+ }
226229 return cast_if_present<BlockArgument>(value);
227230 }
228231
@@ -264,7 +267,7 @@ class EffectInstance {
264267
265268 // / The Symbol, OpOperand, OpResult or BlockArgument that the effect applies
266269 // / to. This is optionally null.
267- PointerUnion<SymbolRefAttr, OpOperand *, OpResult, BlockArgument> value;
270+ PointerUnion<SymbolRefAttr, OpOperand *, OpResult, BlockArgument, Value > value;
268271
269272 // / Additional parameters of the effect instance. An attribute is used for
270273 // / type-safe structured storage and context-based uniquing. Concrete effects
0 commit comments