LLVM 20.0.0git
|
#include "llvm/Transforms/Instrumentation/CGProfile.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/LazyBlockFrequencyInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/ProfileData/InstrProf.h"
#include "llvm/Transforms/Instrumentation.h"
#include <optional>
Go to the source code of this file.
Functions | |
static bool | addModuleFlags (Module &M, MapVector< std::pair< Function *, Function * >, uint64_t > &Counts) |
static bool | runCGProfilePass (Module &M, FunctionAnalysisManager &FAM, bool InLTO) |
|
static |
Definition at line 26 of file CGProfile.cpp.
References llvm::Module::Append, llvm::MDBuilder::createConstant(), llvm::MDNode::get(), llvm::ValueAsMetadata::get(), llvm::MDTuple::getDistinct(), and llvm::Type::getInt64Ty().
Referenced by runCGProfilePass().
|
static |
Definition at line 48 of file CGProfile.cpp.
References addModuleFlags(), llvm::InstrProfSymtab::create(), F, FAM, llvm::CallBase::getCalledFunction(), llvm::InstrProfSymtab::getFunction(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::getValueProfDataFromInst(), I, llvm::CallBase::isIndirectCall(), llvm::TargetTransformInfo::isLoweredToCall(), and llvm::SaturatingAdd().
Referenced by llvm::CGProfilePass::run().