LLVM  15.0.0git
Macros | Functions | Variables
LoadStoreOpt.cpp File Reference
#include "llvm/CodeGen/GlobalISel/LoadStoreOpt.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/CodeGen/GlobalISel/GenericMachineInstrs.h"
#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
#include "llvm/CodeGen/GlobalISel/Utils.h"
#include "llvm/CodeGen/LowLevelType.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Register.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include <algorithm>
Include dependency graph for LoadStoreOpt.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "loadstore-opt"
 

Functions

 STATISTIC (NumStoresMerged, "Number of stores merged")
 
 INITIALIZE_PASS_BEGIN (LoadStoreOpt, DEBUG_TYPE, "Generic memory optimizations", false, false) INITIALIZE_PASS_END(LoadStoreOpt
 
static bool isInstHardMergeHazard (MachineInstr &MI)
 Returns true if the instruction creates an unavoidable hazard that forces a boundary between store merge candidates. More...
 

Variables

const unsigned MaxStoreSizeToForm = 128
 
 DEBUG_TYPE
 
Generic memory optimizations
 
Generic memory false
 

Detailed Description

This file implements the LoadStoreOpt optimization pass.

Definition in file LoadStoreOpt.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "loadstore-opt"

Definition at line 40 of file LoadStoreOpt.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( LoadStoreOpt  ,
DEBUG_TYPE  ,
"Generic memory optimizations ,
false  ,
false   
)

◆ isInstHardMergeHazard()

static bool isInstHardMergeHazard ( MachineInstr MI)
static

Returns true if the instruction creates an unavoidable hazard that forces a boundary between store merge candidates.

Definition at line 284 of file LoadStoreOpt.cpp.

References MI.

◆ STATISTIC()

STATISTIC ( NumStoresMerged  ,
"Number of stores merged"   
)

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 53 of file LoadStoreOpt.cpp.

◆ false

Generic memory false

Definition at line 54 of file LoadStoreOpt.cpp.

◆ MaxStoreSizeToForm

const unsigned MaxStoreSizeToForm = 128

Definition at line 48 of file LoadStoreOpt.cpp.

◆ optimizations

Generic memory optimizations

Definition at line 53 of file LoadStoreOpt.cpp.