LLVM 20.0.0git
|
#include "RISCV.h"
#include "RISCVISelDAGToDAG.h"
#include "RISCVSubtarget.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "riscv-vector-peephole" |
#define | CASE_WHOLE_REGISTER_LMUL_SEW(lmul, sew) |
#define | CASE_WHOLE_REGISTER_LMUL(lmul) |
#define | CASE_VMERGE_TO_VMV(lmul) |
Functions | |
INITIALIZE_PASS (RISCVVectorPeephole, DEBUG_TYPE, "RISC-V Fold Masks", false, false) std | |
Check if an operand is an immediate or a materialized ADDI $x0, imm. | |
static bool | isSafeToMove (const MachineInstr &From, const MachineInstr &To) |
Check if it's safe to move From down to To, checking that no physical registers are clobbered. | |
static unsigned | getSEWLMULRatio (const MachineInstr &MI) |
#define CASE_VMERGE_TO_VMV | ( | lmul | ) |
#define CASE_WHOLE_REGISTER_LMUL | ( | lmul | ) |
#define CASE_WHOLE_REGISTER_LMUL_SEW | ( | lmul, | |
sew | |||
) |
#define DEBUG_TYPE "riscv-vector-peephole" |
Definition at line 40 of file RISCVVectorPeephole.cpp.
|
static |
Definition at line 365 of file RISCVVectorPeephole.cpp.
References llvm::RISCVII::getLMul(), llvm::RISCVVType::getSEWLMULRatio(), llvm::RISCVII::getSEWOpNum(), and MI.
INITIALIZE_PASS | ( | RISCVVectorPeephole | , |
DEBUG_TYPE | , | ||
"RISC-V Fold Masks" | , | ||
false | , | ||
false | |||
) |
Check if an operand is an immediate or a materialized ADDI $x0, imm.
Convert unit strided unmasked loads and stores to whole-register equivalents to avoid the dependency on $vl and $vtype.
x = PseudoVLE8_V_M1 passthru, ptr, vlmax, policy PseudoVSE8_V_M1 v, ptr, vlmax
->
x = VL1RE8_V ptr VS1R_V v, ptr Given two VL operands, returns the one known to be the smallest or nullptr if unknown.
Definition at line 81 of file RISCVVectorPeephole.cpp.
References MRI.
|
static |
Check if it's safe to move From down to To, checking that no physical registers are clobbered.
Definition at line 346 of file RISCVVectorPeephole.cpp.
References assert(), From, llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getParent(), II, and llvm::SmallVectorTemplateBase< T, bool >::push_back().