generatePhi

fun generatePhi(generator: L2Generator, relatedSemanticValues: List<L2SemanticValue>, forcePhiCreation: Boolean, typeRestriction: TypeRestriction, sourceManifests: List<L2ValueManifest>)

Generate an L2_PHI_PSEUDO_OPERATION and any additional moves to ensure the given set of related L2SemanticValues are populated with values from the given sources.

Parameters

generator

The L2Generator on which to write instructions.

relatedSemanticValues

The List of L2SemanticValues that should constitute a synonym in the current manifest, due to their being mutually connected to a synonym in each predecessor manifest. The synonyms may differ in the predecessor manifests, but within each manifest there must be a synonym for that manifest that contains all of these semantic values.

forcePhiCreation

Whether to force creation of a phi instruction, even if all incoming sources of the value are the same.

typeRestriction

The TypeRestriction to bound the synonym.

sourceManifests

A List of L2ValueManifests, one for each incoming edge.