LLVM 20.0.0git
Macros | Functions | Variables
ModuleSummaryIndex.cpp File Reference
#include "llvm/IR/ModuleSummaryIndex.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "module-summary-index"
 

Functions

 STATISTIC (ReadOnlyLiveGVars, "Number of live global variables marked read only")
 
 STATISTIC (WriteOnlyLiveGVars, "Number of live global variables marked write only")
 
static void propagateAttributesToRefs (GlobalValueSummary *S, DenseSet< ValueInfo > &MarkedNonReadWriteOnly)
 
static std::string linkageToString (GlobalValue::LinkageTypes LT)
 
static std::string fflagsToString (FunctionSummary::FFlags F)
 
static std::string getSummaryAttributes (GlobalValueSummary *GVS)
 
static std::string getNodeVisualName (GlobalValue::GUID Id)
 
static std::string getNodeVisualName (const ValueInfo &VI)
 
static std::string getNodeLabel (const ValueInfo &VI, GlobalValueSummary *GVS)
 
static void defineExternalNode (raw_ostream &OS, const char *Pfx, const ValueInfo &VI, GlobalValue::GUID Id)
 
static bool hasReadOnlyFlag (const GlobalValueSummary *S)
 
static bool hasWriteOnlyFlag (const GlobalValueSummary *S)
 
static bool hasConstantFlag (const GlobalValueSummary *S)
 

Variables

static cl::opt< boolPropagateAttrs ("propagate-attrs", cl::init(true), cl::Hidden, cl::desc("Propagate attributes in index"))
 
static cl::opt< boolImportConstantsWithRefs ("import-constants-with-refs", cl::init(true), cl::Hidden, cl::desc("Import constant global variables with references"))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "module-summary-index"

Definition at line 22 of file ModuleSummaryIndex.cpp.

Function Documentation

◆ defineExternalNode()

static void defineExternalNode ( raw_ostream OS,
const char Pfx,
const ValueInfo VI,
GlobalValue::GUID  Id 
)
static

Definition at line 517 of file ModuleSummaryIndex.cpp.

References getNodeVisualName(), and OS.

Referenced by llvm::ModuleSummaryIndex::exportToDot().

◆ fflagsToString()

static std::string fflagsToString ( FunctionSummary::FFlags  F)
static

Definition at line 465 of file ModuleSummaryIndex.cpp.

References F.

Referenced by getSummaryAttributes().

◆ getNodeLabel()

static std::string getNodeLabel ( const ValueInfo VI,
GlobalValueSummary GVS 
)
static

◆ getNodeVisualName() [1/2]

static std::string getNodeVisualName ( const ValueInfo VI)
static

Definition at line 496 of file ModuleSummaryIndex.cpp.

References getNodeVisualName().

◆ getNodeVisualName() [2/2]

static std::string getNodeVisualName ( GlobalValue::GUID  Id)
static

Definition at line 492 of file ModuleSummaryIndex.cpp.

Referenced by defineExternalNode(), getNodeLabel(), and getNodeVisualName().

◆ getSummaryAttributes()

static std::string getSummaryAttributes ( GlobalValueSummary GVS)
static

Definition at line 483 of file ModuleSummaryIndex.cpp.

References fflagsToString().

Referenced by getNodeLabel().

◆ hasConstantFlag()

static bool hasConstantFlag ( const GlobalValueSummary S)
static

Definition at line 542 of file ModuleSummaryIndex.cpp.

Referenced by llvm::ModuleSummaryIndex::exportToDot().

◆ hasReadOnlyFlag()

static bool hasReadOnlyFlag ( const GlobalValueSummary S)
static

Definition at line 530 of file ModuleSummaryIndex.cpp.

Referenced by llvm::ModuleSummaryIndex::exportToDot().

◆ hasWriteOnlyFlag()

static bool hasWriteOnlyFlag ( const GlobalValueSummary S)
static

Definition at line 536 of file ModuleSummaryIndex.cpp.

Referenced by llvm::ModuleSummaryIndex::exportToDot().

◆ linkageToString()

static std::string linkageToString ( GlobalValue::LinkageTypes  LT)
static

◆ propagateAttributesToRefs()

static void propagateAttributesToRefs ( GlobalValueSummary S,
DenseSet< ValueInfo > &  MarkedNonReadWriteOnly 
)
static

◆ STATISTIC() [1/2]

STATISTIC ( ReadOnlyLiveGVars  ,
"Number of live global variables marked read only"   
)

◆ STATISTIC() [2/2]

STATISTIC ( WriteOnlyLiveGVars  ,
"Number of live global variables marked write only"   
)

Variable Documentation

◆ ImportConstantsWithRefs

cl::opt< bool > ImportConstantsWithRefs("import-constants-with-refs", cl::init(true), cl::Hidden, cl::desc("Import constant global variables with references")) ( "import-constants-with-refs"  ,
cl::init(true ,
cl::Hidden  ,
cl::desc("Import constant global variables with references")   
)
static

◆ PropagateAttrs

cl::opt< bool > PropagateAttrs("propagate-attrs", cl::init(true), cl::Hidden, cl::desc("Propagate attributes in index")) ( "propagate-attrs"  ,
cl::init(true ,
cl::Hidden  ,
cl::desc("Propagate attributes in index")   
)
static