populateFromIntersection

fun populateFromIntersection(manifests: List<L2ValueManifest>, generator: L2Generator, generatePhis: Boolean, forcePhis: Boolean, regenerator: L2Regenerator? = null)

Populate the empty receiver with bindings from the incoming manifests. Only keep the bindings for L2SemanticValues that occur in all incoming manifests. Generate phi functions as needed on the provided L2Generator. The phi functions' source registers correspond positionally with the list of manifests.

Parameters

manifests

The list of manifests from which to populate the receiver.

generator

The L2Generator on which to write any necessary phi functions.

generatePhis

Whether to automatically generate L2_PHI_PSEUDO_OPERATIONs if there are multiple incoming edges with different L2Registers associated with the same L2SemanticValues.

forcePhis

Whether to force creation of every possible phi instruction at this point, even if the values always come from the same source. This is needed for loop heads, where the back-edges only show up after that basic block has already produced instructions. Must only be true if generatePhis is also true.

regenerator

The optional L2Regenerator used for translating postponed instructions if needed. If present (which it must be if there are any postponed instructions), the regenerator's generator must be the same as generator.