Skip to main content

Module poison

Module poison 

Source
Expand description

First-class poison values (argpromote v2, ARGPROMOTE_REGISTERS_V2.md).

A poison value is a typed placeholder for a datum whose concrete bits are undefined — the clobber slots of a register/external return pack, and the symbolic arguments of a pure-call emulation. Semantics:

  • GVN never folds it. Every poison is a distinct interned value (they are never deduped), so two poisons of the same type are not congruent and a poison is never congruent with a concrete value. See the congruence rule in the GVN CSE sub-pass.
  • DCE / dead_signature treat it as an ordinary pure value — a store(R, poison) dies iff R is unread; a poison-only pack slot prunes through the normal unused-slot path. No special casing anywhere.
  • Reading poison in the emulator is a hard error. Propagating it as an operand is fine; the trap fires only when its concrete value is demanded.

Poison is engine-internal: it is minted mid-pipeline and is recomputable, so it is deliberately not rendered into textual qcode.

Structs§

Poison
A typed poison value stored in a Context. Carries only its TypeId (hence its width); its bits are undefined.
PoisonId

Type Aliases§

PoisonRef