LLVM 20.0.0git
Macros | Functions
RISCVMakeCompressible.cpp File Reference
#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)
 

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.

Function Documentation

◆ analyzeCompressibleUses()

static Register analyzeCompressibleUses ( MachineInstr FirstMI,
RegImmPair  RegImm,
SmallVectorImpl< MachineInstr * > &  MIs 
)
static

◆ compressedLDSTOffsetMask()

static uint8_t compressedLDSTOffsetMask ( unsigned  Opcode)
static

Definition at line 148 of file RISCVMakeCompressible.cpp.

References offsetMask().

Referenced by updateOperands().

◆ compressibleSPOffset()

static bool compressibleSPOffset ( int64_t  Offset,
unsigned  Opcode 
)
static

Definition at line 154 of file RISCVMakeCompressible.cpp.

References llvm::Offset.

Referenced by getRegImmPairPreventingCompression().

◆ getBaseAdjustForCompression()

static int64_t getBaseAdjustForCompression ( int64_t  Offset,
unsigned  Opcode 
)
static

Definition at line 168 of file RISCVMakeCompressible.cpp.

References llvm::Offset.

Referenced by getRegImmPairPreventingCompression().

◆ getRegImmPairPreventingCompression()

static RegImmPair getRegImmPairPreventingCompression ( const MachineInstr MI)
static

◆ 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.

◆ isCompressedReg()

static bool isCompressedReg ( Register  Reg)
static

Definition at line 174 of file RISCVMakeCompressible.cpp.

Referenced by getRegImmPairPreventingCompression().

◆ isCompressibleLoad()

static bool isCompressibleLoad ( const MachineInstr MI)
static

◆ isCompressibleStore()

static bool isCompressibleStore ( const MachineInstr MI)
static

◆ offsetMask()

static unsigned offsetMask ( unsigned  Opcode)
static

Definition at line 123 of file RISCVMakeCompressible.cpp.

References llvm_unreachable.

Referenced by compressedLDSTOffsetMask().

◆ updateOperands()

static void updateOperands ( MachineInstr MI,
RegImmPair  OldRegImm,
Register  NewReg 
)
static