phi
nanofil
A phi phitmpD, K, Pred−Value gives D the value paired with the block control came from. A block's phis run together on entry, each reading its operand as it stood at the end of the predecessor.
Syntax.v's
phi; Semantics.v'sphis_env, applied when a frame atEnternames the block it came from; interp.pl does the same ininterp:block_outcome/7.The validator treats a phi's operand as used at the end of its predecessor, and its own site as index -1 of its block (
ir:block_sites//1). Phi destinations end the live facts and needs that name them.On a poll edge the pollcheck runs after the phis' copies.
The subtlety: a phi counts as a definition, so its destination can be a single definition (ir:single_definitions/3), yet it is not replayable: its value depends on the edge taken, and no reuse rule reads a relation through it.
Natively a phi has a shadow slot for the parallel copy.
Linked from
- Ahead.v: ahead_block_eq
- Ahead.v: ahead_entry
- Doomed.v: doomed_enter
- Doomed.v: phis_found
- Evidence.v: entry_kill
- IrTerm.v: enc_pair
- IrTerm.v: enc_phi
- NFB guide (Argon): Functions, blocks, phis, and temporaries
- NFB guide (Argon): Implicit dense numbering
- NFB guide (Argon): Instruction header word
- NFB guide (Argon): Opcode map (`nfb_form/3`)
- NFB guide (Argon): Temporaries and dominance (almost-SSA)
- NFB guide (Wonder): 11.2 Function bodies and instruction words
- NFB guide (Wonder): 2. Modules, functions and blocks
- NFB guide (Wonderful): Temporaries and phis
- Pizlonate.v: defined_chks
- Regs.v: hreg
- Semantics.v: phis_env
- Sites.v: block_positions
- Sites.v: phi_position
- Steps.v: step_enter
- Syntax.v: class
- Syntax.v: phi
- Transport.v: dphi
- Validate.v: def
- Validate.v: definitions_dominate
- Validate.v: phis_end_needs
- Validate.v: preds_of
- Validate.v: proof_class_defs
- Validate.v: site
- Validate.v: valid_phi
- Walk.v: entry_live
- block
- home
- shadow