Skip to documentation
SLOP

tiny.choir.backends.regalloc.position

Reference tiny.choir backends regalloc position

Defined in backends.regalloc.

API (8)

Actions

Public operations.

Types and contracts

Public types and contracts.

No direct callersNo direct callsbackends.regallocposition
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Called byCallsNo direct callsbackends.regalloc.intervalfixedPositionPointtest sourcelib.choir.src.backends.regalloc.intervaltest: active set tracks registers and...test sourcelib.choir.src.backends.regalloc.intervaltest: best available register chooses...test sourcelib.choir.src.backends.regalloc.intervaltest: candidate collection preserves ...test sourcelib.choir.src.backends.regalloc.intervaltest: candidate fixed position owners...+12 morebackends.regalloc.PositionPointdefinition
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersbackends.regalloc.PositionPointrankbackends.regalloc.PositionPointgreaterThan
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersbackends.regalloc.PositionPointrankbackends.regalloc.PositionPointlessThan
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callsbackends.regalloc.PositionPointgreaterThanbackends.regalloc.PositionPointlessThanbackends.regalloc.PositionPointrank
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsbackends.regalloc.intervalfixedPositionPointtest sourcelib.choir.src.backends.regalloc.intervaltest: active set tracks registers and...test sourcelib.choir.src.backends.regalloc.intervaltest: best available register chooses...test sourcelib.choir.src.backends.regalloc.intervaltest: candidate collection preserves ...test sourcelib.choir.src.backends.regalloc.intervaltest: candidate fixed position owners...+6 morebackends.regalloc.PositionPointsource
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsbackends.regalloc.intervalCandidatebackends.regalloc.rangeValueLocationRangebackends.regalloc.positionvalueStartPhase
Static calls · unresolved targets: 0 · external targets: 0.

Source: lib/choir/src/backends/regalloc/position.zig

zig
const ir = @import("../../core/root.zig");pub const Phase = enum(u1) {    source,    definition,};pub const Point = struct {    position: u32,    phase: Phase,    pub fn source(position: u32) Point {        return .{ .position = position, .phase = .source };    }    pub fn definition(position: u32) Point {        return .{ .position = position, .phase = .definition };    }    pub fn rank(self: Point) u64 {        return (@as(u64, self.position) << 1) | @backingInt(self.phase);    }    pub fn lessThan(self: Point, other: Point) bool {        return self.rank() < other.rank();    }    pub fn greaterThan(self: Point, other: Point) bool {        return self.rank() > other.rank();    }};pub fn valueStartPhase(value: *const ir.Value) Phase {    return switch (value.kind) {        .block_argument => .source,        .op_result => .definition,    };}test "position points order source before definition" {    const std = @import("std");    const source = Point.source(4);    const definition = Point.definition(4);    try std.testing.expect(source.lessThan(definition));    try std.testing.expect(definition.greaterThan(source));}

Source: lib/choir/src/backends/regalloc/root.zig:4

zig
pub const position = @import("position.zig");

Complete caller list for backends.regalloc.PositionPoint.definition

17 direct callers.

Complete caller list for backends.regalloc.PositionPoint.source

11 direct callers.

Audit

Definitions9
Public names17
Members4
Version26.7.0
Revisiondaab053ee433