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 摘要。