No effects for string builtins#8687
Conversation
|
|
||
| } // namespace wasm | ||
|
|
||
| #endif // wasm_ir_string_builtin_names_h |
There was a problem hiding this comment.
Perhaps this could be in intrinsics.h?
Could have a method there isStringBuiltin parallel to isCallWithoutEffects.
In fact, isCallWithoutEffects might just identify the string builtins too - they are, after all, calls without effects. This generalizes the meaning of that method to not just handle one import but several, though I think this might just work?
There was a problem hiding this comment.
(It would work perfectly in effects.h, and hopefully elsewhere)
There was a problem hiding this comment.
Got it, adding isStringBuiltin sounds good. Putting this into isCallWithoutEffects seems misleading to me since it refers to the intrinsic rather than the property of not having effects in practice (and I see that some cases like wasm-interpreter.h and SignatureRefining.cpp do care specifically about the intrinsic). If we want to know whether a call has no effects, then using EffectAnalyzer seems like the canonical way rather than isCallWithoutEffects, so maybe we can just zero out the effects in EffectAnalyzer?
We'd still need a check in GlobalEffects.cpp since we're not looking at a call expression but instead skipping the effects computation for the whole body.
No description provided.