LLVM
8.0.1
|
#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 | getPreviousInstr (MachineBasicBlock::iterator &I, MachineFunction::iterator MFI) |
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 | isLEA (const int Opcode) |
static bool | isInefficientLEAReg (unsigned int Reg) |
static bool | isRegOperand (const MachineOperand &Op) |
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 int | getADDrrFromLEA (int LEAOpcode) |
static int | getADDriFromLEA (int LEAOpcode, const MachineOperand &Offset) |
static bool | isLEASimpleIncOrDec (MachineInstr &LEA) |
isLEASimpleIncOrDec - Does this LEA have one these forms: lea reg, 1(reg) lea reg, -1(reg) More... | |
#define DEBUG_TYPE FIXUPLEA_NAME |
Definition at line 31 of file X86FixupLEAs.cpp.
#define FIXUPLEA_DESC "X86 LEA Fixup" |
Definition at line 28 of file X86FixupLEAs.cpp.
#define FIXUPLEA_NAME "x86-fixup-LEAs" |
Definition at line 29 of file X86FixupLEAs.cpp.
|
inlinestatic |
Definition at line 315 of file X86FixupLEAs.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineOperand::isImm(), llvm::isInt< 8 >(), and llvm_unreachable.
Referenced by isLEASimpleIncOrDec().
|
inlinestatic |
Definition at line 301 of file X86FixupLEAs.cpp.
References llvm_unreachable.
Referenced by isLEASimpleIncOrDec().
|
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 236 of file X86FixupLEAs.cpp.
References I.
|
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 291 of file X86FixupLEAs.cpp.
References llvm::MachineOperand::getReg(), isInefficientLEAReg(), llvm::MachineOperand::isReg(), and isRegOperand().
Referenced by isLEASimpleIncOrDec().
|
inlinestatic |
Definition at line 297 of file X86FixupLEAs.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineOperand::isGlobal(), and llvm::MachineOperand::isImm().
Referenced by isLEASimpleIncOrDec().
Definition at line 278 of file X86FixupLEAs.cpp.
Referenced by hasInefficientLEABaseReg(), and isLEASimpleIncOrDec().
Definition at line 273 of file X86FixupLEAs.cpp.
Referenced by isLEASimpleIncOrDec().
|
inlinestatic |
isLEASimpleIncOrDec - Does this LEA have one these forms: lea reg, 1(reg) lea reg, -1(reg)
Definition at line 333 of file X86FixupLEAs.cpp.
References llvm::ARM_AM::add, llvm::MachineInstrBuilder::add(), 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::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(), llvm::getX86SubSuperRegister(), hasInefficientLEABaseReg(), hasLEAOffset(), I, llvm::MachineOperand::isImm(), isInefficientLEAReg(), llvm::MachineOperand::isKill(), isLEA(), llvm::MachineOperand::isReg(), LLVM_DEBUG, TII, and llvm::MCInstrDesc::TSFlags.
|
inlinestatic |
Definition at line 283 of file X86FixupLEAs.cpp.
References llvm::MachineOperand::getReg(), and llvm::MachineOperand::isReg().
Referenced by hasInefficientLEABaseReg().
STATISTIC | ( | NumLEAs | , |
"Number of LEA instructions created" | |||
) |