LLVM API Documentation

Defines | Functions | Variables
AArch64LoadStoreOptimizer.cpp File Reference
#include "AArch64InstrInfo.h"
#include "AArch64Subtarget.h"
#include "MCTargetDesc/AArch64AddressingModes.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
Include dependency graph for AArch64LoadStoreOptimizer.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "aarch64-ldst-opt"

Functions

 STATISTIC (NumPairCreated,"Number of load/store pair instructions generated")
 STATISTIC (NumPostFolded,"Number of post-index updates folded")
 STATISTIC (NumPreFolded,"Number of pre-index updates folded")
 STATISTIC (NumUnscaledPairCreated,"Number of load/store from unscaled generated")
static bool isUnscaledLdst (unsigned Opc)
static unsigned getMatchingPairOpcode (unsigned Opc)
static unsigned getPreIndexedOpcode (unsigned Opc)
static unsigned getPostIndexedOpcode (unsigned Opc)
static void trackRegDefsUses (MachineInstr *MI, BitVector &ModifiedRegs, BitVector &UsedRegs, const TargetRegisterInfo *TRI)
static bool inBoundsForPair (bool IsUnscaled, int Offset, int OffsetStride)
static int alignTo (int Num, int PowOf2)
static bool isMatchingUpdateInsn (MachineInstr *MI, unsigned BaseReg, int Offset)

Variables

static cl::opt< unsignedScanLimit ("aarch64-load-store-scan-limit", cl::init(20), cl::Hidden)
static cl::opt< boolEnableAArch64UnscaledMemOp ("aarch64-unscaled-mem-op", cl::Hidden, cl::desc("Allow AArch64 unscaled load/store combining"), cl::init(true))

Define Documentation

#define DEBUG_TYPE   "aarch64-ldst-opt"

Definition at line 33 of file AArch64LoadStoreOptimizer.cpp.


Function Documentation

static int alignTo ( int  Num,
int  PowOf2 
) [static]

Definition at line 379 of file AArch64LoadStoreOptimizer.cpp.

static unsigned getMatchingPairOpcode ( unsigned  Opc) [static]

Definition at line 179 of file AArch64LoadStoreOptimizer.cpp.

References llvm_unreachable.

static unsigned getPostIndexedOpcode ( unsigned  Opc) [static]

Definition at line 243 of file AArch64LoadStoreOptimizer.cpp.

References llvm_unreachable.

static unsigned getPreIndexedOpcode ( unsigned  Opc) [static]

Definition at line 216 of file AArch64LoadStoreOptimizer.cpp.

References llvm_unreachable.

static bool inBoundsForPair ( bool  IsUnscaled,
int  Offset,
int  OffsetStride 
) [static]

Definition at line 362 of file AArch64LoadStoreOptimizer.cpp.

static bool isMatchingUpdateInsn ( MachineInstr MI,
unsigned  BaseReg,
int  Offset 
) [static]
static bool isUnscaledLdst ( unsigned  Opc) [static]

Definition at line 114 of file AArch64LoadStoreOptimizer.cpp.

STATISTIC ( NumPairCreated  ,
"Number of load/store pair instructions generated  
)

AArch64AllocLoadStoreOpt - Post-register allocation pass to combine load / store instructions to form ldp / stp instructions.

STATISTIC ( NumPostFolded  ,
"Number of post-index updates folded"   
)
STATISTIC ( NumPreFolded  ,
"Number of pre-index updates folded"   
)
STATISTIC ( NumUnscaledPairCreated  ,
"Number of load/store from unscaled generated  
)
static void trackRegDefsUses ( MachineInstr MI,
BitVector ModifiedRegs,
BitVector UsedRegs,
const TargetRegisterInfo TRI 
) [static]

Variable Documentation

cl::opt<bool> EnableAArch64UnscaledMemOp("aarch64-unscaled-mem-op", cl::Hidden, cl::desc("Allow AArch64 unscaled load/store combining"), cl::init(true)) [static]
cl::opt<unsigned> ScanLimit("aarch64-load-store-scan-limit", cl::init(20), cl::Hidden) [static]