LLVM  15.0.0git
Macros | Functions | Variables
RISCVInsertVSETVLI.cpp File Reference
#include "RISCV.h"
#include "RISCVSubtarget.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include <queue>
Include dependency graph for RISCVInsertVSETVLI.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "riscv-insert-vsetvli"
 
#define RISCV_INSERT_VSETVLI_NAME   "RISCV Insert VSETVLI pass"
 

Functions

 INITIALIZE_PASS (RISCVInsertVSETVLI, DEBUG_TYPE, RISCV_INSERT_VSETVLI_NAME, false, false) static bool isVectorConfigInstr(const MachineInstr &MI)
 
static bool isVLPreservingConfig (const MachineInstr &MI)
 Return true if this is 'vsetvli x0, x0, vtype' which preserves VL and only sets VTYPE. More...
 
static VSETVLIInfo computeInfoForInstr (const MachineInstr &MI, uint64_t TSFlags, const MachineRegisterInfo *MRI)
 
static VSETVLIInfo getInfoForVSETVLI (const MachineInstr &MI)
 
static bool hasFixedResult (const VSETVLIInfo &Info, const RISCVSubtarget &ST)
 Return true if the VL value configured must be equal to the requested one. More...
 
static void doUnion (DemandedFields &A, DemandedFields B)
 
static bool canMutatePriorConfig (const MachineInstr &PrevMI, const MachineInstr &MI, const DemandedFields &Used)
 

Variables

static cl::opt< bool > DisableInsertVSETVLPHIOpt ("riscv-disable-insert-vsetvl-phi-opt", cl::init(false), cl::Hidden, cl::desc("Disable looking through phis when inserting vsetvlis."))
 
static cl::opt< bool > UseStrictAsserts ("riscv-insert-vsetvl-strict-asserts", cl::init(true), cl::Hidden, cl::desc("Enable strict assertion checking for the dataflow algorithm"))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "riscv-insert-vsetvli"

Definition at line 34 of file RISCVInsertVSETVLI.cpp.

◆ RISCV_INSERT_VSETVLI_NAME

#define RISCV_INSERT_VSETVLI_NAME   "RISCV Insert VSETVLI pass"

Definition at line 35 of file RISCVInsertVSETVLI.cpp.

Function Documentation

◆ canMutatePriorConfig()

static bool canMutatePriorConfig ( const MachineInstr PrevMI,
const MachineInstr MI,
const DemandedFields &  Used 
)
static

◆ computeInfoForInstr()

static VSETVLIInfo computeInfoForInstr ( const MachineInstr MI,
uint64_t  TSFlags,
const MachineRegisterInfo MRI 
)
static

◆ doUnion()

static void doUnion ( DemandedFields &  A,
DemandedFields  B 
)
static

Definition at line 1380 of file RISCVInsertVSETVLI.cpp.

References B.

◆ getInfoForVSETVLI()

static VSETVLIInfo getInfoForVSETVLI ( const MachineInstr MI)
static

Definition at line 926 of file RISCVInsertVSETVLI.cpp.

References assert(), and MI.

◆ hasFixedResult()

static bool hasFixedResult ( const VSETVLIInfo &  Info,
const RISCVSubtarget ST 
)
static

Return true if the VL value configured must be equal to the requested one.

Definition at line 1285 of file RISCVInsertVSETVLI.cpp.

References llvm::RISCVVType::decodeVLMUL(), Info, and llvm::ARM_MB::ST.

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( RISCVInsertVSETVLI  ,
DEBUG_TYPE  ,
RISCV_INSERT_VSETVLI_NAME  ,
false  ,
false   
) const &

Definition at line 758 of file RISCVInsertVSETVLI.cpp.

References MI.

◆ isVLPreservingConfig()

static bool isVLPreservingConfig ( const MachineInstr MI)
static

Return true if this is 'vsetvli x0, x0, vtype' which preserves VL and only sets VTYPE.

Definition at line 769 of file RISCVInsertVSETVLI.cpp.

References assert(), and MI.

Referenced by canMutatePriorConfig().

Variable Documentation

◆ DisableInsertVSETVLPHIOpt

cl::opt<bool> DisableInsertVSETVLPHIOpt("riscv-disable-insert-vsetvl-phi-opt", cl::init(false), cl::Hidden, cl::desc("Disable looking through phis when inserting vsetvlis."))
static

◆ UseStrictAsserts

cl::opt<bool> UseStrictAsserts("riscv-insert-vsetvl-strict-asserts", cl::init(true), cl::Hidden, cl::desc("Enable strict assertion checking for the dataflow algorithm"))
static