Skip to content

Proposal: @prefetch builtin #3600

Closed
Closed
@data-man

Description

@data-man

Accepted Proposal


LLVM docs

@llvm.prefetch(i8* <address>, i32 <rw>, i32 <locality>, i32 <cache type>)

Possible syntax:

pub const FetchType = enum {
    Read,
    Write
}

pub const CacheType = enum {
    Instruction,
    Data
}

pub const Locality = enum {
    No,
    ...,
    ...,
    Extremely
}

@prefetch(comptime fetchType: FetchType,
          comptime cacheType: CacheType,
          comptime locality: Locality,
          ptr: var) noreturn

Related: #767

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions