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 281 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.
|
static |
Definition at line 148 of file RISCVMakeCompressible.cpp.
References offsetMask().
Referenced by updateOperands().
Definition at line 154 of file RISCVMakeCompressible.cpp.
References llvm::Offset.
Referenced by getRegImmPairPreventingCompression().
|
static |
Definition at line 168 of file RISCVMakeCompressible.cpp.
References llvm::Offset.
Referenced by getRegImmPairPreventingCompression().
|
static |
Definition at line 233 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 174 of file RISCVMakeCompressible.cpp.
Referenced by getRegImmPairPreventingCompression().
|
static |
Definition at line 181 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 202 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 123 of file RISCVMakeCompressible.cpp.
References llvm_unreachable.
Referenced by compressedLDSTOffsetMask().
|
static |
Definition at line 339 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().