|
LLVM
8.0.1
|
#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/ADT/StringRef.h"#include "llvm/Analysis/IndirectCallPromotionAnalysis.h"#include "llvm/Analysis/IndirectCallVisitor.h"#include "llvm/Analysis/OptimizationRemarkEmitter.h"#include "llvm/Analysis/ProfileSummaryInfo.h"#include "llvm/IR/Attributes.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/LLVMContext.h"#include "llvm/IR/MDBuilder.h"#include "llvm/IR/PassManager.h"#include "llvm/IR/Type.h"#include "llvm/IR/Value.h"#include "llvm/Pass.h"#include "llvm/ProfileData/InstrProf.h"#include "llvm/Support/Casting.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Debug.h"#include "llvm/Support/Error.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Transforms/Instrumentation.h"#include "llvm/Transforms/Instrumentation/PGOInstrumentation.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/CallPromotionUtils.h"#include <cassert>#include <cstdint>#include <memory>#include <string>#include <utility>#include <vector>
Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "pgo-icall-prom" |
Functions | |
| STATISTIC (NumOfPGOICallPromotion, "Number of indirect call promotions.") | |
| STATISTIC (NumOfPGOICallsites, "Number of indirect call candidate sites.") | |
| INITIALIZE_PASS_BEGIN (PGOIndirectCallPromotionLegacyPass, "pgo-icall-prom", "Use PGO instrumentation profile to promote indirect " "calls to direct calls.", false, false) INITIALIZE_PASS_END(PGOIndirectCallPromotionLegacyPass | |
| static bool | promoteIndirectCalls (Module &M, ProfileSummaryInfo *PSI, bool InLTO, bool SamplePGO, ModuleAnalysisManager *AM=nullptr) |
Variables | |
| static cl::opt< bool > | DisableICP ("disable-icp", cl::init(false), cl::Hidden, cl::desc("Disable indirect call promotion")) |
| static cl::opt< unsigned > | ICPCutOff ("icp-cutoff", cl::init(0), cl::Hidden, cl::ZeroOrMore, cl::desc("Max number of promotions for this compilation")) |
| static cl::opt< unsigned > | ICPCSSkip ("icp-csskip", cl::init(0), cl::Hidden, cl::ZeroOrMore, cl::desc("Skip Callsite up to this number for this compilation")) |
| static cl::opt< bool > | ICPLTOMode ("icp-lto", cl::init(false), cl::Hidden, cl::desc("Run indirect-call promotion in LTO " "mode")) |
| static cl::opt< bool > | ICPSamplePGOMode ("icp-samplepgo", cl::init(false), cl::Hidden, cl::desc("Run indirect-call promotion in SamplePGO mode")) |
| static cl::opt< bool > | ICPCallOnly ("icp-call-only", cl::init(false), cl::Hidden, cl::desc("Run indirect-call promotion for call instructions " "only")) |
| static cl::opt< bool > | ICPInvokeOnly ("icp-invoke-only", cl::init(false), cl::Hidden, cl::desc("Run indirect-call promotion for " "invoke instruction only")) |
| static cl::opt< bool > | ICPDUMPAFTER ("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")) |
| pgo icall | prom |
| pgo icall Use PGO instrumentation profile to promote indirect calls to direct | calls |
| pgo icall Use PGO instrumentation profile to promote indirect calls to direct | false |
| #define DEBUG_TYPE "pgo-icall-prom" |
Definition at line 60 of file IndirectCallPromotion.cpp.
Referenced by llvm::createPGOIndirectCallPromotionLegacyPass(), and llvm::pgo::promoteIndirectCall().
| INITIALIZE_PASS_BEGIN | ( | PGOIndirectCallPromotionLegacyPass | , |
| "pgo-icall-prom" | , | ||
| "Use PGO instrumentation profile to promote indirect " "calls to direct calls." | , | ||
| false | , | ||
| false | |||
| ) |
|
static |
Definition at line 383 of file IndirectCallPromotion.cpp.
References llvm::InstrProfSymtab::create(), llvm::dbgs(), DisableICP, E, F(), ICPCutOff, ICPDUMPAFTER, ICPLTOMode, ICPSamplePGOMode, LLVM_DEBUG, llvm::Attribute::OptimizeNone, and llvm::toString().
Referenced by llvm::PGOIndirectCallPromotion::run().
| STATISTIC | ( | NumOfPGOICallPromotion | , |
| "Number of indirect call promotions." | |||
| ) |
| STATISTIC | ( | NumOfPGOICallsites | , |
| "Number of indirect call candidate sites." | |||
| ) |
| pgo icall Use PGO instrumentation profile to promote indirect calls to direct calls |
Definition at line 156 of file IndirectCallPromotion.cpp.
|
static |
Referenced by promoteIndirectCalls().
| pgo icall Use PGO instrumentation profile to promote indirect calls to direct false |
Definition at line 156 of file IndirectCallPromotion.cpp.
|
static |
Referenced by llvm::createPGOIndirectCallPromotionLegacyPass().
|
static |
Referenced by llvm::createPGOIndirectCallPromotionLegacyPass().
|
static |
Referenced by llvm::createPGOIndirectCallPromotionLegacyPass(), and promoteIndirectCalls().
|
static |
Referenced by promoteIndirectCalls().
|
static |
Referenced by llvm::createPGOIndirectCallPromotionLegacyPass().
|
static |
Referenced by promoteIndirectCalls(), and llvm::PGOIndirectCallPromotion::run().
|
static |
Referenced by promoteIndirectCalls(), and llvm::PGOIndirectCallPromotion::run().
| pgo icall prom |
Definition at line 156 of file IndirectCallPromotion.cpp.
1.8.13