LLVM 20.0.0git
|
#include "RISCV.h"
#include "RISCVSubtarget.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Debug.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "riscv-make-compressible" |
#define | RISCV_COMPRESS_INSTRS_NAME "RISC-V Make Compressible" |
Functions | |
INITIALIZE_PASS (RISCVMakeCompressibleOpt, "riscv-make-compressible", RISCV_COMPRESS_INSTRS_NAME, false, false) static unsigned log2LdstWidth(unsigned Opcode) | |
static unsigned | offsetMask (unsigned Opcode) |
static uint8_t | compressedLDSTOffsetMask (unsigned Opcode) |
static bool | compressibleSPOffset (int64_t Offset, unsigned Opcode) |
static int64_t | getBaseAdjustForCompression (int64_t Offset, unsigned Opcode) |
static bool | isCompressedReg (Register Reg) |
static bool | isCompressibleLoad (const MachineInstr &MI) |
static bool | isCompressibleStore (const MachineInstr &MI) |
static RegImmPair | getRegImmPairPreventingCompression (const MachineInstr &MI) |
static Register | analyzeCompressibleUses (MachineInstr &FirstMI, RegImmPair RegImm, SmallVectorImpl< MachineInstr * > &MIs) |
static void | updateOperands (MachineInstr &MI, RegImmPair OldRegImm, Register NewReg) |
#define DEBUG_TYPE "riscv-make-compressible" |
Definition at line 77 of file RISCVMakeCompressible.cpp.
#define RISCV_COMPRESS_INSTRS_NAME "RISC-V Make Compressible" |
Definition at line 78 of file RISCVMakeCompressible.cpp.
|
static |
Definition at line 295 of file RISCVMakeCompressible.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::RegScavenger::backward(), contains(), llvm::RegScavenger::enterBasicBlockEnd(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), getRegImmPairPreventingCompression(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::RegImmPair::Imm, llvm::MachineBasicBlock::instr_end(), MBB, MI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::RegImmPair::Reg, llvm::RegScavenger::scavengeRegisterBackwards(), llvm::SmallVectorBase< Size_T >::size(), and TRI.
Definition at line 156 of file RISCVMakeCompressible.cpp.
References offsetMask().
Referenced by updateOperands().
Definition at line 162 of file RISCVMakeCompressible.cpp.
References llvm::Offset.
Referenced by getRegImmPairPreventingCompression().
|
static |
Definition at line 176 of file RISCVMakeCompressible.cpp.
References llvm::Offset.
Referenced by getRegImmPairPreventingCompression().
|
static |
Definition at line 247 of file RISCVMakeCompressible.cpp.
References llvm::sampleprof::Base, compressibleSPOffset(), contains(), getBaseAdjustForCompression(), llvm::MachineOperand::getImm(), isCompressedReg(), isCompressibleLoad(), isCompressibleStore(), llvm::MachineOperand::isImm(), MI, and llvm::Offset.
Referenced by analyzeCompressibleUses().
INITIALIZE_PASS | ( | RISCVMakeCompressibleOpt | , |
"riscv-make-compressible" | , | ||
RISCV_COMPRESS_INSTRS_NAME | , | ||
false | , | ||
false | |||
) |
Definition at line 94 of file RISCVMakeCompressible.cpp.
References llvm_unreachable.
Definition at line 182 of file RISCVMakeCompressible.cpp.
Referenced by getRegImmPairPreventingCompression().
|
static |
Definition at line 191 of file RISCVMakeCompressible.cpp.
References llvm::RISCVSubtarget::hasStdExtCOrZca(), llvm::RISCVSubtarget::hasStdExtCOrZcd(), llvm::RISCVSubtarget::hasStdExtCOrZcfOrZce(), llvm::RISCVSubtarget::is64Bit(), and MI.
Referenced by getRegImmPairPreventingCompression(), and updateOperands().
|
static |
Definition at line 214 of file RISCVMakeCompressible.cpp.
References llvm::RISCVSubtarget::hasStdExtCOrZca(), llvm::RISCVSubtarget::hasStdExtCOrZcd(), llvm::RISCVSubtarget::hasStdExtCOrZcfOrZce(), llvm::RISCVSubtarget::is64Bit(), and MI.
Referenced by getRegImmPairPreventingCompression(), and updateOperands().
Definition at line 127 of file RISCVMakeCompressible.cpp.
References llvm_unreachable.
Referenced by compressedLDSTOffsetMask().
|
static |
Definition at line 357 of file RISCVMakeCompressible.cpp.
References assert(), compressedLDSTOffsetMask(), llvm::drop_begin(), llvm::MachineOperand::getImm(), llvm::RegImmPair::Imm, isCompressibleLoad(), isCompressibleStore(), MI, llvm::RegImmPair::Reg, and llvm::MachineOperand::setImm().