LLVM 22.0.0git
FunctionPropertiesAnalysis.cpp File Reference
#include "llvm/Analysis/FunctionPropertiesAnalysis.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include <deque>
#include "llvm/IR/FunctionProperties.def"

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Macros

#define DEBUG_TYPE   "func-properties-stats"
#define FUNCTION_PROPERTY(Name, Description)
#define DETAILED_FUNCTION_PROPERTY(Name, Description)
#define COUNT_OPERAND(OPTYPE)
#define FUNCTION_PROPERTY(Name, Description)
#define DETAILED_FUNCTION_PROPERTY(Name, Description)
#define FUNCTION_PROPERTY(Name, Description)
#define DETAILED_FUNCTION_PROPERTY(Name, Description)

Functions

LLVM_ABI cl::opt< boolllvm::EnableDetailedFunctionProperties ("enable-detailed-function-properties", cl::Hidden, cl::init(false), cl::desc("Whether or not to compute detailed function properties."))

Variables

static cl::opt< unsignedllvm::BigBasicBlockInstructionThreshold ("big-basic-block-instruction-threshold", cl::Hidden, cl::init(500), cl::desc("The minimum number of instructions a basic block should contain " "before being considered big."))
static cl::opt< unsignedllvm::MediumBasicBlockInstructionThreshold ("medium-basic-block-instruction-threshold", cl::Hidden, cl::init(15), cl::desc("The minimum number of instructions a basic block should contain " "before being considered medium-sized."))
static cl::opt< unsignedCallWithManyArgumentsThreshold ("call-with-many-arguments-threshold", cl::Hidden, cl::init(4), cl::desc("The minimum number of arguments a function call must have before " "it is considered having many arguments."))

Macro Definition Documentation

◆ COUNT_OPERAND

#define COUNT_OPERAND ( OPTYPE)
Value:
if (isa<OPTYPE>(Operand)) { \
OPTYPE##OperandCount += Direction; \
continue; \
}
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
Definition Casting.h:547

◆ DEBUG_TYPE

#define DEBUG_TYPE   "func-properties-stats"

Definition at line 30 of file FunctionPropertiesAnalysis.cpp.

◆ DETAILED_FUNCTION_PROPERTY [1/3]

#define DETAILED_FUNCTION_PROPERTY ( Name,
Description )
Value:
STATISTIC(Total##Name, Description);
#define STATISTIC(VARNAME, DESC)
Definition Statistic.h:171

Definition at line 34 of file FunctionPropertiesAnalysis.cpp.

◆ DETAILED_FUNCTION_PROPERTY [2/3]

#define DETAILED_FUNCTION_PROPERTY ( Name,
Description )
Value:
OS << #Name ": " << Name << "\n"; \
}
LLVM_ABI cl::opt< bool > EnableDetailedFunctionProperties("enable-detailed-function-properties", cl::Hidden, cl::init(false), cl::desc("Whether or not to compute detailed function properties."))

Definition at line 34 of file FunctionPropertiesAnalysis.cpp.

◆ DETAILED_FUNCTION_PROPERTY [3/3]

#define DETAILED_FUNCTION_PROPERTY ( Name,
Description )
Value:
Total##Name += AnalysisResults.Name;

Definition at line 34 of file FunctionPropertiesAnalysis.cpp.

◆ FUNCTION_PROPERTY [1/3]

#define FUNCTION_PROPERTY ( Name,
Description )
Value:
STATISTIC(Total##Name, Description);

Definition at line 32 of file FunctionPropertiesAnalysis.cpp.

◆ FUNCTION_PROPERTY [2/3]

#define FUNCTION_PROPERTY ( Name,
Description )
Value:
OS << #Name ": " << Name << "\n";

Definition at line 32 of file FunctionPropertiesAnalysis.cpp.

◆ FUNCTION_PROPERTY [3/3]

#define FUNCTION_PROPERTY ( Name,
Description )
Value:
Total##Name += AnalysisResults.Name;

Definition at line 32 of file FunctionPropertiesAnalysis.cpp.

Variable Documentation

◆ CallWithManyArgumentsThreshold

cl::opt< unsigned > CallWithManyArgumentsThreshold("call-with-many-arguments-threshold", cl::Hidden, cl::init(4), cl::desc("The minimum number of arguments a function call must have before " "it is considered having many arguments.")) ( "call-with-many-arguments-threshold" ,
cl::Hidden ,
cl::init(4) ,
cl::desc("The minimum number of arguments a function call must have before " "it is considered having many arguments.")  )
static