|
LLVM 24.0.0git
|
This pass is used to reduce the size of instructions where applicable. More...
#include "Mips.h"#include "MipsInstrInfo.h"#include "MipsSubtarget.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MachineFunctionAnalysisManager.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachinePassManager.h"#include "llvm/IR/Analysis.h"#include "llvm/Pass.h"#include "llvm/Support/Debug.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "mips-micromips-reduce-size" |
| #define | MICROMIPS_SIZE_REDUCE_NAME "MicroMips instruction size reduce pass" |
Variables | |
| static ReduceEntryVector | ReduceTable |
This pass is used to reduce the size of instructions where applicable.
TODO: Implement microMIPS64 support.
Definition in file MicroMipsSizeReduction.cpp.
| #define DEBUG_TYPE "mips-micromips-reduce-size" |
Definition at line 26 of file MicroMipsSizeReduction.cpp.
| #define MICROMIPS_SIZE_REDUCE_NAME "MicroMips instruction size reduce pass" |
Definition at line 27 of file MicroMipsSizeReduction.cpp.
Referenced by INITIALIZE_PASS().
|
static |
Definition at line 197 of file MicroMipsSizeReduction.cpp.
References llvm::maskTrailingZeros().
Referenced by ReduceADDIUToADDIUSP().
|
static |
Definition at line 231 of file MicroMipsSizeReduction.cpp.
References ImmInRange(), MI, and llvm::Mips::RA.
Referenced by ReduceXWtoXWP().
|
static |
Definition at line 279 of file MicroMipsSizeReduction.cpp.
References ConsecutiveRegisters(), GetImm(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().
Referenced by ReduceXWtoXWP().
Definition at line 258 of file MicroMipsSizeReduction.cpp.
References Registers.
Referenced by ConsecutiveInstr().
|
static |
Definition at line 188 of file MicroMipsSizeReduction.cpp.
Referenced by ConsecutiveInstr(), llvm::ShapeT::deduceImm(), ImmInRange(), and ReduceADDIUToADDIUSP().
|
static |
Definition at line 217 of file MicroMipsSizeReduction.cpp.
References GetImm(), InRange(), and MI.
Referenced by CheckXWPInstr(), ReduceADDIUToADDIUR1SP(), ReduceLXUtoLXU16(), ReduceSXtoSX16(), and ReduceXWtoXWSP().
| INITIALIZE_PASS | ( | MicroMipsSizeReduceLegacy | , |
| DEBUG_TYPE | , | ||
| MICROMIPS_SIZE_REDUCE_NAME | , | ||
| false | , | ||
| false | ) const & |
Definition at line 162 of file MicroMipsSizeReduction.cpp.
References const, DEBUG_TYPE, MICROMIPS_SIZE_REDUCE_NAME, and llvm::Mips::SP.
Definition at line 207 of file MicroMipsSizeReduction.cpp.
References llvm::maskTrailingZeros().
Referenced by llvm::ConstantFoldGetElementPtr(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getPtrAdd(), ImmInRange(), llvm::GCNUpwardRPTracker::reset(), splitGlobal(), and writeOptimizationInfo().
|
static |
Definition at line 180 of file MicroMipsSizeReduction.cpp.
References llvm::MachineOperand::getReg(), and llvm::MachineOperand::isReg().
Referenced by ReduceSXtoSX16().
|
static |
Definition at line 173 of file MicroMipsSizeReduction.cpp.
References llvm::MachineOperand::getReg(), and llvm::MachineOperand::isReg().
Referenced by ReduceADDIUToADDIUR1SP(), ReduceArithmeticInstructions(), ReduceLXUtoLXU16(), ReduceSXtoSX16(), and ReduceXORtoXOR16().
Definition at line 539 of file MicroMipsSizeReduction.cpp.
References Reg.
Referenced by ReduceMoveToMovep().
Definition at line 550 of file MicroMipsSizeReduction.cpp.
Referenced by ReduceMoveToMovep().
Definition at line 527 of file MicroMipsSizeReduction.cpp.
References Reg.
Referenced by ReduceMoveToMovep().
|
static |
Definition at line 457 of file MicroMipsSizeReduction.cpp.
References Arguments, ImmInRange(), isMMThreeBitGPRegister(), MI, and ReplaceInstruction().
|
static |
Definition at line 473 of file MicroMipsSizeReduction.cpp.
References AddiuspImmValue(), Arguments, GetImm(), MI, and ReplaceInstruction().
|
static |
Definition at line 442 of file MicroMipsSizeReduction.cpp.
References Arguments, isMMThreeBitGPRegister(), MI, and ReplaceInstruction().
|
static |
Definition at line 493 of file MicroMipsSizeReduction.cpp.
References Arguments, ImmInRange(), isMMThreeBitGPRegister(), MI, and ReplaceInstruction().
|
static |
Reduces width of instructions in the specified basic block.
Definition at line 732 of file MicroMipsSizeReduction.cpp.
References E(), MBB, MI, Modified, and ReduceMI().
Referenced by runMipsSizeReduce().
|
static |
Definition at line 704 of file MicroMipsSizeReduction.cpp.
References Arguments, llvm::End, MI, Range, and ReduceTable.
Referenced by ReduceMBB().
|
static |
Definition at line 566 of file MicroMipsSizeReduction.cpp.
References Arguments, E(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), IsMovepDestinationReg(), IsMovepDestinationRegPair(), IsMovepSrcRegister(), and ReplaceInstruction().
|
static |
Definition at line 510 of file MicroMipsSizeReduction.cpp.
References Arguments, ImmInRange(), isMMSourceRegister(), isMMThreeBitGPRegister(), MI, and ReplaceInstruction().
|
static |
Definition at line 612 of file MicroMipsSizeReduction.cpp.
References Arguments, isMMThreeBitGPRegister(), MI, and ReplaceInstruction().
|
static |
Definition at line 400 of file MicroMipsSizeReduction.cpp.
References Arguments, CheckXWPInstr(), ConsecutiveInstr(), E(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and ReplaceInstruction().
|
static |
Definition at line 384 of file MicroMipsSizeReduction.cpp.
References Arguments, ImmInRange(), MI, and ReplaceInstruction().
|
static |
Definition at line 300 of file MicroMipsSizeReduction.cpp.
References llvm::MachineInstrBuilder::add(), llvm::BuildMI(), llvm::dbgs(), LLVM_DEBUG, llvm_unreachable, MBB, MI, and llvm::MachineInstrBuilder::setMIFlags().
Referenced by ReduceADDIUToADDIUR1SP(), ReduceADDIUToADDIUSP(), ReduceArithmeticInstructions(), ReduceLXUtoLXU16(), ReduceMoveToMovep(), ReduceSXtoSX16(), ReduceXORtoXOR16(), ReduceXWtoXWP(), and ReduceXWtoXWSP().
|
static |
Definition at line 754 of file MicroMipsSizeReduction.cpp.
References llvm::MachineFunction::begin(), E(), llvm::MachineFunction::end(), llvm::MachineFunction::getSubtarget(), I, Modified, ReduceMBB(), and Subtarget.
Referenced by llvm::MicroMipsSizeReducePass::run().
| STATISTIC | ( | NumReduced | ) |
|
static |
Definition at line 632 of file MicroMipsSizeReduction.cpp.
Referenced by INITIALIZE_PASS(), and ReduceMI().