Remove `call.without.effects` intrinsic

未关闭
#9,399 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@stevenfontanella 已经在做这个了。

开始于 2026年11月17日。

评估

这个 Issue 还没有评估数据。

描述

Binaryen exposes a call.without.effects intrinsic that indicates that the underlying function call can be assumed to have no effects and thus can be e.g. removed if its return value isn't demanded. This intrinsic has since been subsumed by the annotations @binaryen.removable.if.unused and @binaryen.idempotent. In addition, call.without.effects has an awkward representation in our IR which has caused some bugs (#8693, #9393, #9404), and requires special handling by several passes, which in many cases aren't interested in the actual effects, but just need extra introspection to find the actual function being called: link (#9393 is an example of this).

We should remove the intrinsic once toolchains aren't making use of it anymore.


call.without.effects doesn't correspond exactly to either of @binaryen.removable.if.unused or @binaryen.idempotent. call.without.effects does imply removable.if.unused, however it does not imply idempotent, because call.without.effects calls may still be generative (i.e. they may allocate), in which case the calls are not idempotent. When migrating, @binaryen.removable.if.unused can be safely inserted but @binaryen.idempotent needs to be considered on a case-by-case basis.

主要语言
WebAssembly
星标
8.7k
派生
913
平均合并
2 天 14 小时
30 天内合并 PR
92

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

WebAssembly/binaryen 的其他 Issue

查看 WebAssembly/binaryen 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。