MLIR
22.0.0git
|
#include "llvm/Support/MathExtras.h"
#include <iostream>
#include <stdint.h>
#include <string_view>
Go to the source code of this file.
Macros | |
#define | MLIR_ARMRUNNERUTILS_EXPORTED __attribute__((visibility("default"))) |
#define | PR_SVE_SET_VL 50 |
#define | PR_SME_SET_VL 63 |
#define | PR_VL_LEN_MASK 0xffff |
Functions | |
static void | setArmVectorLength (std::string_view helper_name, int option, uint32_t bits) |
Sets the vector length (streaming or not, as indicated by option ) to bits . More... | |
void MLIR_ARMRUNNERUTILS_EXPORTED | setArmVLBits (uint32_t bits) |
Sets the SVE vector length (in bits) to bits . More... | |
void MLIR_ARMRUNNERUTILS_EXPORTED | setArmSVLBits (uint32_t bits) |
Sets the SME streaming vector length (in bits) to bits . More... | |
#define MLIR_ARMRUNNERUTILS_EXPORTED __attribute__((visibility("default"))) |
Definition at line 17 of file ArmRunnerUtils.cpp.
#define PR_SME_SET_VL 63 |
Definition at line 35 of file ArmRunnerUtils.cpp.
#define PR_SVE_SET_VL 50 |
Definition at line 31 of file ArmRunnerUtils.cpp.
#define PR_VL_LEN_MASK 0xffff |
Definition at line 39 of file ArmRunnerUtils.cpp.
void MLIR_ARMRUNNERUTILS_EXPORTED setArmSVLBits | ( | uint32_t | bits | ) |
Sets the SME streaming vector length (in bits) to bits
.
Definition at line 77 of file ArmRunnerUtils.cpp.
References PR_SME_SET_VL, and setArmVectorLength().
|
static |
Sets the vector length (streaming or not, as indicated by option
) to bits
.
Caveat emptor: If a function has allocated stack slots for SVE registers (e.g. slots for callee-saved SVE registers or spill slots) changing the vector length is tricky and error prone - it may cause incorrect stack deallocation or incorrect access to stack slots.
The recommended strategy is to call setArmVectorLength
only from functions that do not access SVE registers, either by themselves or by inlining other functions.
Definition at line 52 of file ArmRunnerUtils.cpp.
References PR_VL_LEN_MASK.
Referenced by setArmSVLBits(), and setArmVLBits().
void MLIR_ARMRUNNERUTILS_EXPORTED setArmVLBits | ( | uint32_t | bits | ) |
Sets the SVE vector length (in bits) to bits
.
Definition at line 72 of file ArmRunnerUtils.cpp.
References PR_SVE_SET_VL, and setArmVectorLength().