LLVM 20.0.0git
Namespaces | Macros | Functions | Variables
CodeGenData.cpp File Reference
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/CGData/CodeGenDataReader.h"
#include "llvm/CGData/OutlinedHashTreeRecord.h"
#include "llvm/CGData/StableFunctionMapRecord.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/Caching.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/WithColor.h"
#include "llvm/CGData/CodeGenData.inc"

Go to the source code of this file.

Namespaces

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

Macros

#define DEBUG_TYPE   "cg-data"
 
#define CG_DATA_SECT_ENTRY(Kind, SectNameCommon, SectNameCoff, Prefix)    SectNameCommon,
 
#define CG_DATA_SECT_ENTRY(Kind, SectNameCommon, SectNameCoff, Prefix)    SectNameCoff,
 
#define CG_DATA_SECT_ENTRY(Kind, SectNameCommon, SectNameCoff, Prefix)   Prefix,
 

Functions

static std::string getCGDataErrString (cgdata_error Err, const std::string &ErrMsg="")
 
std::string llvm::getCodeGenDataSectionName (CGDataSectKind CGSK, Triple::ObjectFormatType OF, bool AddSegmentInfo=true)
 
void llvm::cgdata::warn (Twine Message, std::string Whence="", std::string Hint="")
 
void llvm::cgdata::warn (Error E, StringRef Whence="")
 
void llvm::cgdata::saveModuleForTwoRounds (const Module &TheModule, unsigned Task, AddStreamFn AddStream)
 Save TheModule before the first codegen round.
 
std::unique_ptr< Modulellvm::cgdata::loadModuleForTwoRounds (BitcodeModule &OrigModule, unsigned Task, LLVMContext &Context, ArrayRef< StringRef > IRFiles)
 Load the optimized bitcode module for the second codegen round.
 
Expected< stable_hashllvm::cgdata::mergeCodeGenData (ArrayRef< StringRef > ObjectFiles)
 Merge the codegen data from the scratch objects ObjectFiles from the first codegen round.
 

Variables

cl::opt< boolCodeGenDataGenerate ("codegen-data-generate", cl::init(false), cl::Hidden, cl::desc("Emit CodeGen Data into custom sections"))
 
cl::opt< std::string > CodeGenDataUsePath ("codegen-data-use-path", cl::init(""), cl::Hidden, cl::desc("File path to where .cgdata file is read"))
 
cl::opt< boolCodeGenDataThinLTOTwoRounds ("codegen-data-thinlto-two-rounds", cl::init(false), cl::Hidden, cl::desc("Enable two-round ThinLTO code generation. The first round " "emits codegen data, while the second round uses the emitted " "codegen data for further optimizations."))
 

Macro Definition Documentation

◆ CG_DATA_SECT_ENTRY [1/3]

#define CG_DATA_SECT_ENTRY (   Kind,
  SectNameCommon,
  SectNameCoff,
  Prefix 
)     SectNameCommon,

◆ CG_DATA_SECT_ENTRY [2/3]

#define CG_DATA_SECT_ENTRY (   Kind,
  SectNameCommon,
  SectNameCoff,
  Prefix 
)     SectNameCoff,

◆ CG_DATA_SECT_ENTRY [3/3]

#define CG_DATA_SECT_ENTRY (   Kind,
  SectNameCommon,
  SectNameCoff,
  Prefix 
)    Prefix,

◆ DEBUG_TYPE

#define DEBUG_TYPE   "cg-data"

Definition at line 25 of file CodeGenData.cpp.

Function Documentation

◆ getCGDataErrString()

static std::string getCGDataErrString ( cgdata_error  Err,
const std::string &  ErrMsg = "" 
)
static

Definition at line 42 of file CodeGenData.cpp.

References OS.

Referenced by llvm::CGDataError::message().

Variable Documentation

◆ CodeGenDataGenerate

cl::opt< bool > CodeGenDataGenerate("codegen-data-generate", cl::init(false), cl::Hidden, cl::desc("Emit CodeGen Data into custom sections")) ( "codegen-data-generate"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc("Emit CodeGen Data into custom sections")   
)

◆ CodeGenDataThinLTOTwoRounds

cl::opt< bool > CodeGenDataThinLTOTwoRounds("codegen-data-thinlto-two-rounds", cl::init(false), cl::Hidden, cl::desc("Enable two-round ThinLTO code generation. The first round " "emits codegen data, while the second round uses the emitted " "codegen data for further optimizations.")) ( "codegen-data-thinlto-two-rounds"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc("Enable two-round ThinLTO code generation. The first round " "emits codegen data, while the second round uses the emitted " "codegen data for further optimizations.")   
)

◆ CodeGenDataUsePath

cl::opt< std::string > CodeGenDataUsePath("codegen-data-use-path", cl::init(""), cl::Hidden, cl::desc("File path to where .cgdata file is read")) ( "codegen-data-use-path"  ,
cl::init("")  ,
cl::Hidden  ,
cl::desc("File path to where .cgdata file is read")   
)