Page MenuHomePhabricator

[RISCV] Support scalar/fix-length vector NTLH intrinsic with different domain
Needs ReviewPublic

Authored by BeMg on Feb 5 2023, 8:38 PM.

Details

Summary

This commit implements the two NTLH intrinsic functions.

type __rv_ntl_load (type *ptr, int domain);
void __rv_ntl_store (type *ptr, type val, int domain);
enum {
  __RISCV_NTLH_INNERMOST_PRIVATE = 2,
  __RISCV_NTLH_ALL_PRIVATE,
  __RISCV_NTLH_INNERMOST_SHARED,
  __RISCV_NTLH_ALL
};

We encode the non-temporal domain into MachineMemOperand flags.

  1. Create the RISC-V built-in function with custom semantic checking.
  2. Assume the domain argument is a compile time constant,

and make it as LLVM IR metadata (nontemp_node).

  1. Encode domain value as two bits MachineMemOperand TargetMMOflag.
  2. According to MachineMemOperand TargetMMOflag, select corrsponding ntlh instruction.

Currently, it supports scalar type and fixed-length vector type.

Diff Detail

Event Timeline

BeMg created this revision.Feb 5 2023, 8:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2023, 8:38 PM
BeMg requested review of this revision.Feb 5 2023, 8:38 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 5 2023, 8:38 PM
BeMg retitled this revision from [RISCV] Support scalar NTLH intrinsic with different domain to [RISCV] Support scalar/fix-length vector NTLH intrinsic with different domain.Feb 5 2023, 8:40 PM
BeMg edited the summary of this revision. (Show Details)
BeMg edited the summary of this revision. (Show Details)