LLVM  10.0.0svn
Macros | Functions | Variables
ExpandMemCmp.cpp File Reference
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/IRBuilder.h"
Include dependency graph for ExpandMemCmp.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "expandmemcmp"
 

Functions

 STATISTIC (NumMemCmpCalls, "Number of memcmp calls")
 
 STATISTIC (NumMemCmpNotConstant, "Number of memcmp calls without constant size")
 
 STATISTIC (NumMemCmpGreaterThanMax, "Number of memcmp calls with size greater than max size")
 
 STATISTIC (NumMemCmpInlined, "Number of inlined memcmp calls")
 
 INITIALIZE_PASS_BEGIN (ExpandMemCmpPass, "expandmemcmp", "Expand memcmp() to load/stores", false, false) INITIALIZE_PASS_END(ExpandMemCmpPass
 
Expand memcmp () to load/stores"
 

Variables

static cl::opt< unsignedMemCmpEqZeroNumLoadsPerBlock ("memcmp-num-loads-per-block", cl::Hidden, cl::init(1), cl::desc("The number of loads per basic block for inline expansion of " "memcmp that is only being compared against zero."))
 
static cl::opt< unsignedMaxLoadsPerMemcmp ("max-loads-per-memcmp", cl::Hidden, cl::desc("Set maximum number of loads used in expanded memcmp"))
 
static cl::opt< unsignedMaxLoadsPerMemcmpOptSize ("max-loads-per-memcmp-opt-size", cl::Hidden, cl::desc("Set maximum number of loads used in expanded memcmp for -Os/Oz"))
 
 expandmemcmp
 
Expand false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "expandmemcmp"

Definition at line 26 of file ExpandMemCmp.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( ExpandMemCmpPass  ,
"expandmemcmp"  ,
"Expand memcmp() to load/stores ,
false  ,
false   
)

◆ memcmp()

Expand memcmp ( )

◆ STATISTIC() [1/4]

STATISTIC ( NumMemCmpCalls  ,
"Number of memcmp calls  
)

◆ STATISTIC() [2/4]

STATISTIC ( NumMemCmpNotConstant  ,
"Number of memcmp calls without constant size"   
)

◆ STATISTIC() [3/4]

STATISTIC ( NumMemCmpGreaterThanMax  ,
"Number of memcmp calls with size greater than max size"   
)

◆ STATISTIC() [4/4]

STATISTIC ( NumMemCmpInlined  ,
"Number of inlined memcmp calls  
)

Variable Documentation

◆ expandmemcmp

expandmemcmp

Definition at line 866 of file ExpandMemCmp.cpp.

◆ false

Expand false

Definition at line 867 of file ExpandMemCmp.cpp.

◆ MaxLoadsPerMemcmp

cl::opt<unsigned> MaxLoadsPerMemcmp("max-loads-per-memcmp", cl::Hidden, cl::desc("Set maximum number of loads used in expanded memcmp"))
static

◆ MaxLoadsPerMemcmpOptSize

cl::opt<unsigned> MaxLoadsPerMemcmpOptSize("max-loads-per-memcmp-opt-size", cl::Hidden, cl::desc("Set maximum number of loads used in expanded memcmp for -Os/Oz"))
static

◆ MemCmpEqZeroNumLoadsPerBlock

cl::opt<unsigned> MemCmpEqZeroNumLoadsPerBlock("memcmp-num-loads-per-block", cl::Hidden, cl::init(1), cl::desc("The number of loads per basic block for inline expansion of " "memcmp that is only being compared against zero."))
static