Unassign VirtReg from its physical register.

Synopsis

Declared in <llvm/CodeGen/LiveRegMatrix.h>

void
unassign(
    LiveInterval const& VirtReg,
    bool ClearAllReferencingSegments = false);

Description

Assuming that VirtReg was previously assigned to a PhysReg, this undoes the assignment and updates VirtRegMap accordingly. ClearAllReferencingSegments changes the way segments are removed from the matrix:

  • If false (default), only segments that exactly match VirtReg's live range are removed.

  • If true, all segments that reference VirtReg are removed. This is useful when VirtReg's live range(s) is already empty.

Parameters

Name

Description

VirtReg

Virtual register live interval to unassign.

ClearAllReferencingSegments

If true, remove every matrix segment that references VirtReg; otherwise remove only exact matches.

Created with MrDocs