tiny.choir.backends.regalloc.position
Defined in backends.regalloc.
API (8)
Actions
Public operations.
Types and contracts
Public types and contracts.
Source
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.
tiny.choir.backends.regalloc.interval.fixedPositionPoint[function] atlib/choir/src/backends/regalloc/interval.zig:162lib.choir.src.backends.regalloc.interval.test_active_set_tracks_registers_and_expires_by_point_phase[function] — test source atlib/choir/src/backends/regalloc/interval.zig:625in nearest public ownertiny.choir.backends.regalloc.intervallib.choir.src.backends.regalloc.interval.test_best_available_register_chooses_farthest_available_point[function] — test source atlib/choir/src/backends/regalloc/interval.zig:715in nearest public ownertiny.choir.backends.regalloc.intervallib.choir.src.backends.regalloc.interval.test_candidate_collection_preserves_order_and_indexes_values[function] — test source atlib/choir/src/backends/regalloc/interval.zig:518in nearest public ownertiny.choir.backends.regalloc.intervallib.choir.src.backends.regalloc.interval.test_candidate_fixed_position_ownership_is_requirement_based[function] — test source atlib/choir/src/backends/regalloc/interval.zig:566in nearest public ownertiny.choir.backends.regalloc.intervallib.choir.src.backends.regalloc.locations.test_value_location_index_preserves_phase_and_earliest_overlap_semantics[function] — test source atlib/choir/src/backends/regalloc/locations.zig:424in nearest public ownertiny.choir.backends.regalloc.locationslib.choir.src.backends.regalloc.locations.test_value_location_index_tracks_values_registers_and_events[function] — test source atlib/choir/src/backends/regalloc/locations.zig:356in nearest public ownertiny.choir.backends.regalloc.locationslib.choir.src.backends.regalloc.loops.test_loop_intervals_extend_crossing_candidates_to_the_trailing_position[function] — test source atlib/choir/src/backends/regalloc/loops.zig:63in nearest public ownertiny.choir.backends.regalloc.loopslib.choir.src.backends.regalloc.position.test_position_points_order_source_before_definition[function] — test source atlib/choir/src/backends/regalloc/position.zig:40in nearest public ownertiny.choir.backends.regalloc.positionlib.choir.src.backends.regalloc.range.test_candidate_range_fixed-position_conflict_query_uses_proposed_range[function] — test source atlib/choir/src/backends/regalloc/range.zig:183in nearest public ownertiny.choir.backends.regalloc.rangelib.choir.src.backends.regalloc.range.test_value_location_range_append_skips_empty_ranges[function] — test source atlib/choir/src/backends/regalloc/range.zig:255in nearest public ownertiny.choir.backends.regalloc.rangelib.choir.src.backends.regalloc.range.test_value_location_ranges_cover_values_and_block_registers_at_points[function] — test source atlib/choir/src/backends/regalloc/range.zig:155in nearest public ownertiny.choir.backends.regalloc.rangelib.choir.src.backends.regalloc.verify.VerificationFixture.init[method] — private source atlib/choir/src/backends/regalloc/verify.zig:391in nearest public ownertiny.choir.backends.regalloc.verifylib.choir.src.backends.regalloc.verify.test_allocation_verifier_accepts_owned_noninterfering_ranges[function] — test source atlib/choir/src/backends/regalloc/verify.zig:864in nearest public ownertiny.choir.backends.regalloc.verifylib.choir.src.backends.regalloc.verify.test_allocation_verifier_rejects_ranges_outside_candidate_intervals[function] — test source atlib/choir/src/backends/regalloc/verify.zig:825in nearest public ownertiny.choir.backends.regalloc.verifylib.choir.src.properties.candidates.CandidateCollectionProperty.property[function] — private source atlib/choir/src/properties/candidates.zig:30in nearest public ownerlib.choir.src.properties.candidateslib.choir.src.properties.candidates.CandidateUseProperty.property[function] — private source atlib/choir/src/properties/candidates.zig:160in nearest public ownerlib.choir.src.properties.candidates
Complete caller list for backends.regalloc.PositionPoint.source
11 direct callers.
tiny.choir.backends.regalloc.interval.fixedPositionPoint[function] atlib/choir/src/backends/regalloc/interval.zig:162lib.choir.src.backends.regalloc.interval.test_active_set_tracks_registers_and_expires_by_point_phase[function] — test source atlib/choir/src/backends/regalloc/interval.zig:625in nearest public ownertiny.choir.backends.regalloc.intervallib.choir.src.backends.regalloc.interval.test_best_available_register_chooses_farthest_available_point[function] — test source atlib/choir/src/backends/regalloc/interval.zig:715in nearest public ownertiny.choir.backends.regalloc.intervallib.choir.src.backends.regalloc.interval.test_candidate_collection_preserves_order_and_indexes_values[function] — test source atlib/choir/src/backends/regalloc/interval.zig:518in nearest public ownertiny.choir.backends.regalloc.intervallib.choir.src.backends.regalloc.interval.test_candidate_fixed_position_ownership_is_requirement_based[function] — test source atlib/choir/src/backends/regalloc/interval.zig:566in nearest public ownertiny.choir.backends.regalloc.intervallib.choir.src.backends.regalloc.locations.test_value_location_index_preserves_phase_and_earliest_overlap_semantics[function] — test source atlib/choir/src/backends/regalloc/locations.zig:424in nearest public ownertiny.choir.backends.regalloc.locationslib.choir.src.backends.regalloc.locations.test_value_location_index_tracks_values_registers_and_events[function] — test source atlib/choir/src/backends/regalloc/locations.zig:356in nearest public ownertiny.choir.backends.regalloc.locationstiny.choir.backends.regalloc.loops.extendAcrossLoops[function] atlib/choir/src/backends/regalloc/loops.zig:15lib.choir.src.backends.regalloc.loops.test_loop_intervals_extend_crossing_candidates_to_the_trailing_position[function] — test source atlib/choir/src/backends/regalloc/loops.zig:63in nearest public ownertiny.choir.backends.regalloc.loopslib.choir.src.backends.regalloc.position.test_position_points_order_source_before_definition[function] — test source atlib/choir/src/backends/regalloc/position.zig:40in nearest public ownertiny.choir.backends.regalloc.positionlib.choir.src.backends.regalloc.range.test_candidate_range_fixed-position_conflict_query_uses_proposed_range[function] — test source atlib/choir/src/backends/regalloc/range.zig:183in nearest public ownertiny.choir.backends.regalloc.range
Audit
| Definitions | 9 |
|---|---|
| Public names | 17 |
| Members | 4 |
| Version | 26.7.0 |
| Revision | daab053ee433 |