LLVM  5.0.0
Namespaces | Macros | Functions | Variables
PGOMemOPSizeOpt.cpp File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Type.h"
#include "llvm/Pass.h"
#include "llvm/PassRegistry.h"
#include "llvm/PassSupport.h"
#include "llvm/ProfileData/InstrProf.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/PGOInstrumentation.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <cassert>
#include <cstdint>
#include <vector>
Include dependency graph for PGOMemOPSizeOpt.cpp:

Go to the source code of this file.

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define DEBUG_TYPE   "pgo-memop-opt"
 

Functions

 STATISTIC (NumOfPGOMemOPOpt,"Number of memop intrinsics optimized.")
 
 STATISTIC (NumOfPGOMemOPAnnotate,"Number of memop intrinsics annotated.")
 
 INITIALIZE_PASS_BEGIN (PGOMemOPSizeOptLegacyPass,"pgo-memop-opt","Optimize memory intrinsic using its size value profile", false, false) INITIALIZE_PASS_END(PGOMemOPSizeOptLegacyPass
 
static bool PGOMemOPSizeOptImpl (Function &F, BlockFrequencyInfo &BFI)
 

Variables

static cl::opt< unsigned > MemOPCountThreshold ("pgo-memop-count-threshold", cl::Hidden, cl::ZeroOrMore, cl::init(1000), cl::desc("The minimum count to optimize memory ""intrinsic calls"))
 
static cl::opt< bool > DisableMemOPOPT ("disable-memop-opt", cl::init(false), cl::Hidden, cl::desc("Disable optimize"))
 
static cl::opt< unsigned > MemOPPercentThreshold ("pgo-memop-percent-threshold", cl::init(40), cl::Hidden, cl::ZeroOrMore, cl::desc("The percentage threshold for the ""memory intrinsic calls optimization"))
 
static cl::opt< unsigned > MemOPMaxVersion ("pgo-memop-max-version", cl::init(3), cl::Hidden, cl::ZeroOrMore, cl::desc("The max version for the optimized memory "" intrinsic calls"))
 
static cl::opt< bool > MemOPScaleCount ("pgo-memop-scale-count", cl::init(true), cl::Hidden, cl::desc("Scale the memop size counts using the basic "" block count value"))
 
cl::opt< std::string > MemOPSizeRange
 
cl::opt< unsigned > MemOPSizeLarge
 
pgo memop opt
 
char & llvm::PGOMemOPSizeOptID = PGOMemOPSizeOptLegacyPass::ID
 

Macro Definition Documentation

#define DEBUG_TYPE   "pgo-memop-opt"

Definition at line 55 of file PGOMemOPSizeOpt.cpp.

Function Documentation

INITIALIZE_PASS_BEGIN ( PGOMemOPSizeOptLegacyPass  ,
"pgo-memop-opt"  ,
"Optimize memory intrinsic using its size value profile"  ,
false  ,
false   
)
static bool PGOMemOPSizeOptImpl ( Function &  F,
BlockFrequencyInfo &  BFI 
)
static

Definition at line 389 of file PGOMemOPSizeOpt.cpp.

References DisableMemOPOPT, and llvm::Function::hasFnAttribute().

Referenced by llvm::PGOMemOPSizeOpt::run().

STATISTIC ( NumOfPGOMemOPOpt  ,
"Number of memop intrinsics optimized."   
)
STATISTIC ( NumOfPGOMemOPAnnotate  ,
"Number of memop intrinsics annotated."   
)

Variable Documentation

cl::opt<bool> DisableMemOPOPT("disable-memop-opt", cl::init(false), cl::Hidden, cl::desc("Disable optimize"))
static

Referenced by PGOMemOPSizeOptImpl().

cl::opt<unsigned> MemOPCountThreshold("pgo-memop-count-threshold", cl::Hidden, cl::ZeroOrMore, cl::init(1000), cl::desc("The minimum count to optimize memory ""intrinsic calls"))
static
cl::opt<unsigned> MemOPMaxVersion("pgo-memop-max-version", cl::init(3), cl::Hidden, cl::ZeroOrMore, cl::desc("The max version for the optimized memory "" intrinsic calls"))
static
cl::opt<unsigned> MemOPPercentThreshold("pgo-memop-percent-threshold", cl::init(40), cl::Hidden, cl::ZeroOrMore, cl::desc("The percentage threshold for the ""memory intrinsic calls optimization"))
static
cl::opt<bool> MemOPScaleCount("pgo-memop-scale-count", cl::init(true), cl::Hidden, cl::desc("Scale the memop size counts using the basic "" block count value"))
static
cl::opt<unsigned> MemOPSizeLarge
cl::opt<std::string> MemOPSizeRange
pgo memop opt

Definition at line 123 of file PGOMemOPSizeOpt.cpp.