LLVM  4.0.0
Macros | Functions
X86FixupLEAs.cpp File Reference
#include "X86.h"
#include "X86InstrInfo.h"
#include "X86Subtarget.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/LiveVariables.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
Include dependency graph for X86FixupLEAs.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "x86-fixup-LEAs"
 

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 isLEASimpleIncOrDec (MachineInstr &LEA)
 isLEASimpleIncOrDec - Does this LEA have one these forms: lea reg, 1(reg) lea reg, -1(reg) More...
 

Macro Definition Documentation

#define DEBUG_TYPE   "x86-fixup-LEAs"

Definition at line 30 of file X86FixupLEAs.cpp.

Function Documentation

static bool getPreviousInstr ( MachineBasicBlock::iterator I,
MachineFunction::iterator  MFI 
)
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 207 of file X86FixupLEAs.cpp.

References I.

static bool isLEA ( const int  opcode)
inlinestatic

Definition at line 245 of file X86FixupLEAs.cpp.

static bool isLEASimpleIncOrDec ( MachineInstr LEA)
inlinestatic

isLEASimpleIncOrDec - Does this LEA have one these forms: lea reg, 1(reg) lea reg, -1(reg)

Definition at line 253 of file X86FixupLEAs.cpp.

References llvm::X86::AddrBaseReg, llvm::X86::AddrDisp, llvm::X86::AddrIndexReg, llvm::X86::AddrSegmentReg, llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and llvm::MachineOperand::isImm().

STATISTIC ( NumLEAs  ,
"Number of LEA instructions created"   
)