LLVM 22.0.0git
RISCVMakeCompressible.cpp File Reference

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)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "riscv-make-compressible"

Definition at line 77 of file RISCVMakeCompressible.cpp.

◆ RISCV_COMPRESS_INSTRS_NAME

#define RISCV_COMPRESS_INSTRS_NAME   "RISC-V Make Compressible"

Definition at line 78 of file RISCVMakeCompressible.cpp.

Referenced by INITIALIZE_PASS().

Function Documentation

◆ analyzeCompressibleUses()

◆ compressedLDSTOffsetMask()

uint8_t compressedLDSTOffsetMask ( unsigned Opcode)
static

Definition at line 160 of file RISCVMakeCompressible.cpp.

References offsetMask().

Referenced by getBaseAdjustForCompression(), and updateOperands().

◆ compressibleSPOffset()

bool compressibleSPOffset ( int64_t Offset,
unsigned Opcode )
static

Definition at line 166 of file RISCVMakeCompressible.cpp.

References llvm::isShiftedUInt(), and llvm::Offset.

Referenced by getRegImmPairPreventingCompression().

◆ getBaseAdjustForCompression()

int64_t getBaseAdjustForCompression ( int64_t Offset,
unsigned Opcode )
static

◆ getRegImmPairPreventingCompression()

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( RISCVMakeCompressibleOpt ,
"riscv-make-compressible" ,
RISCV_COMPRESS_INSTRS_NAME ,
false ,
false  )

Definition at line 94 of file RISCVMakeCompressible.cpp.

References llvm_unreachable, and RISCV_COMPRESS_INSTRS_NAME.

◆ isCompressedReg()

bool isCompressedReg ( Register Reg)
static

Definition at line 186 of file RISCVMakeCompressible.cpp.

References Reg.

Referenced by getRegImmPairPreventingCompression().

◆ isCompressibleLoad()

◆ isCompressibleStore()

◆ offsetMask()

unsigned offsetMask ( unsigned Opcode)
static

Definition at line 129 of file RISCVMakeCompressible.cpp.

References llvm_unreachable, and llvm::maskTrailingOnes().

Referenced by compressedLDSTOffsetMask().

◆ updateOperands()