Remove `call.without.effects` intrinsic

Offen
#9,399 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@stevenfontanella arbeitet bereits daran.

Seit 17.11.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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.

Vorherrschende Sprache
WebAssembly
Sterne
8.7k
Forks
913
Ø Merge
2 T. 14 Std.
Gemergte PRs (30 T.)
92

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus WebAssembly/binaryen

Alle Issues in WebAssembly/binaryen

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.