Class IrBasicBlock
Represents a basic block in a MuLang IR function.
public sealed record IrBasicBlock : IEquatable<IrBasicBlock>
- Inheritance
-
IrBasicBlock
- Implements
- Inherited Members
Constructors
IrBasicBlock(int, IReadOnlyCollection<IrInstruction>, IrTerminator)
Initializes a new instance of the IrBasicBlock class using root lifetime ownership.
[Obsolete("Use the constructor that includes lifetime ownership.")]
public IrBasicBlock(int Id, IReadOnlyCollection<IrInstruction> Instructions, IrTerminator Terminator)
Parameters
IdintThe block identifier within the function.
InstructionsIReadOnlyCollection<IrInstruction>The instructions executed by the block.
TerminatorIrTerminatorThe control-flow terminator.
IrBasicBlock(int, IReadOnlyCollection<IrInstruction>, IrTerminator, int)
Represents a basic block in a MuLang IR function.
public IrBasicBlock(int Id, IReadOnlyCollection<IrInstruction> Instructions, IrTerminator Terminator, int LifetimeRegion)
Parameters
IdintThe block identifier within the function.
InstructionsIReadOnlyCollection<IrInstruction>The instructions executed by the block.
TerminatorIrTerminatorThe control-flow terminator.
LifetimeRegionintThe owning lifetime-region identifier.
Properties
Id
The block identifier within the function.
public int Id { get; init; }
Property Value
Instructions
The instructions executed by the block.
public IReadOnlyCollection<IrInstruction> Instructions { get; init; }
Property Value
LifetimeRegion
The owning lifetime-region identifier.
public int LifetimeRegion { get; init; }
Property Value
Terminator
The control-flow terminator.
public IrTerminator Terminator { get; init; }
Property Value
Methods
Deconstruct(out int, out IReadOnlyCollection<IrInstruction>, out IrTerminator)
Deconstructs the block using the legacy component shape.
[Obsolete("Use the deconstruction shape that includes lifetime ownership.")]
public void Deconstruct(out int Id, out IReadOnlyCollection<IrInstruction> Instructions, out IrTerminator Terminator)
Parameters
IdintThe block identifier within the function.
InstructionsIReadOnlyCollection<IrInstruction>The instructions executed by the block.
TerminatorIrTerminatorThe control-flow terminator.
Deconstruct(out int, out IReadOnlyCollection<IrInstruction>, out IrTerminator, out int)
public void Deconstruct(out int Id, out IReadOnlyCollection<IrInstruction> Instructions, out IrTerminator Terminator, out int LifetimeRegion)
Parameters
IdintInstructionsIReadOnlyCollection<IrInstruction>TerminatorIrTerminatorLifetimeRegionint
Equals(IrBasicBlock?)
public bool Equals(IrBasicBlock? other)
Parameters
otherIrBasicBlock
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(IrBasicBlock?, IrBasicBlock?)
public static bool operator ==(IrBasicBlock? left, IrBasicBlock? right)
Parameters
leftIrBasicBlockrightIrBasicBlock
Returns
operator !=(IrBasicBlock?, IrBasicBlock?)
public static bool operator !=(IrBasicBlock? left, IrBasicBlock? right)
Parameters
leftIrBasicBlockrightIrBasicBlock