Remove `call.without.effects` intrinsic

Ouverte
#9,399 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@stevenfontanella y travaille déjà.

Depuis le 17/11/2026.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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.

Langage dominant
WebAssembly
Étoiles
8.7k
Forks
913
Merge moyen
2 j 14 h
PR mergées (30 j)
92

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de WebAssembly/binaryen

Toutes les issues de WebAssembly/binaryen

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.