|
LLVM
10.0.0
|
#include "X86.h"#include "X86InstrInfo.h"#include "X86Subtarget.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/Passes.h"#include "llvm/CodeGen/TargetSchedule.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"Go to the source code of this file.
Macros | |
| #define | FIXUPLEA_DESC "X86 LEA Fixup" |
| #define | FIXUPLEA_NAME "x86-fixup-LEAs" |
| #define | DEBUG_TYPE FIXUPLEA_NAME |
Functions | |
| STATISTIC (NumLEAs, "Number of LEA instructions created") | |
| static bool | isLEA (unsigned Opcode) |
| static bool | getPreviousInstr (MachineBasicBlock::iterator &I, MachineBasicBlock &MBB) |
| getPreviousInstr - Given a reference to an instruction in a basic block, return a reference to the previous instruction in the block, wrapping around to the last instruction of the block if the block branches to itself. More... | |
| static bool | isInefficientLEAReg (unsigned Reg) |
| static bool | hasInefficientLEABaseReg (const MachineOperand &Base, const MachineOperand &Index) |
| Returns true if this LEA uses base an index registers, and the base register is known to be inefficient for the subtarget. More... | |
| static bool | hasLEAOffset (const MachineOperand &Offset) |
| static unsigned | getADDrrFromLEA (unsigned LEAOpcode) |
| static unsigned | getADDriFromLEA (unsigned LEAOpcode, const MachineOperand &Offset) |
| static unsigned | getINCDECFromLEA (unsigned LEAOpcode, bool IsINC) |
| #define DEBUG_TYPE FIXUPLEA_NAME |
Definition at line 30 of file X86FixupLEAs.cpp.
| #define FIXUPLEA_DESC "X86 LEA Fixup" |
Definition at line 27 of file X86FixupLEAs.cpp.
| #define FIXUPLEA_NAME "x86-fixup-LEAs" |
Definition at line 28 of file X86FixupLEAs.cpp.
|
inlinestatic |
Definition at line 326 of file X86FixupLEAs.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineOperand::isImm(), llvm::isInt< 8 >(), and llvm_unreachable.
Referenced by getINCDECFromLEA().
Definition at line 314 of file X86FixupLEAs.cpp.
References llvm_unreachable.
Referenced by getINCDECFromLEA().
Definition at line 340 of file X86FixupLEAs.cpp.
References add(), llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::X86::AddrBaseReg, llvm::X86::AddrDisp, llvm::MachineInstrBuilder::addReg(), llvm::X86::AddrIndexReg, llvm::X86::AddrScaleAmt, llvm::X86::AddrSegmentReg, assert(), llvm::BuildMI(), llvm::HexagonInstrInfo::copyPhysReg(), llvm::dbgs(), llvm::MachineInstr::dump(), llvm::MachineBasicBlock::erase(), llvm::N86::ESP, getADDriFromLEA(), getADDrrFromLEA(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getDesc(), llvm::MachineOperand::getImm(), llvm::X86II::getMemoryOperandNo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::X86II::getOperandBias(), llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getPrevNode(), llvm::MachineOperand::getReg(), hasInefficientLEABaseReg(), hasLEAOffset(), I, llvm::RegState::Implicit, llvm::MachineOperand::isImm(), isInefficientLEAReg(), llvm::MachineOperand::isKill(), llvm::MachineOperand::isReg(), LLVM_DEBUG, llvm_unreachable, std::swap(), TII, TRI, and llvm::MCInstrDesc::TSFlags.
|
inlinestatic |
getPreviousInstr - Given a reference to an instruction in a basic block, return a reference to the previous instruction in the block, wrapping around to the last instruction of the block if the block branches to itself.
Definition at line 258 of file X86FixupLEAs.cpp.
References llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), I, and llvm::MachineBasicBlock::isPredecessor().
|
inlinestatic |
Returns true if this LEA uses base an index registers, and the base register is known to be inefficient for the subtarget.
Definition at line 304 of file X86FixupLEAs.cpp.
References llvm::MachineOperand::getReg(), isInefficientLEAReg(), and llvm::MachineOperand::isReg().
Referenced by getINCDECFromLEA().
|
inlinestatic |
Definition at line 310 of file X86FixupLEAs.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineOperand::isGlobal(), and llvm::MachineOperand::isImm().
Referenced by getINCDECFromLEA().
Definition at line 295 of file X86FixupLEAs.cpp.
Referenced by getINCDECFromLEA(), and hasInefficientLEABaseReg().
Definition at line 188 of file X86FixupLEAs.cpp.
References llvm::dbgs(), llvm::MachineFunction::getFunction(), llvm::X86Subtarget::getInstrInfo(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::X86Subtarget::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::Function::hasOptSize(), I, llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), llvm::X86Subtarget::LEAusesAG(), LLVM_DEBUG, llvm::RegUsage, llvm::X86Subtarget::slow3OpsLEA(), llvm::X86Subtarget::slowIncDec(), llvm::X86Subtarget::slowLEA(), llvm::ARM_MB::ST, TII, TRI, and llvm::X86Subtarget::useLeaForSP().
| STATISTIC | ( | NumLEAs | , |
| "Number of LEA instructions created" | |||
| ) |
1.8.13