LLVM
12.0.0git
|
#include "llvm/Analysis/CFGPrinter.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include <algorithm>
Go to the source code of this file.
Functions | |
static void | writeCFGToDotFile (Function &F, BlockFrequencyInfo *BFI, BranchProbabilityInfo *BPI, uint64_t MaxFreq, bool CFGOnly=false) |
static void | viewCFG (Function &F, const BlockFrequencyInfo *BFI, const BranchProbabilityInfo *BPI, uint64_t MaxFreq, bool CFGOnly=false) |
INITIALIZE_PASS (CFGViewerLegacyPass, "view-cfg", "View CFG of function", false, true) PreservedAnalyses CFGViewerPass | |
INITIALIZE_PASS (CFGOnlyViewerLegacyPass, "view-cfg-only", "View CFG of function (with no function bodies)", false, true) PreservedAnalyses CFGOnlyViewerPass | |
INITIALIZE_PASS (CFGPrinterLegacyPass, "dot-cfg", "Print CFG of function to 'dot' file", false, true) PreservedAnalyses CFGPrinterPass | |
INITIALIZE_PASS (CFGOnlyPrinterLegacyPass, "dot-cfg-only", "Print CFG of function to 'dot' file (with no function bodies)", false, true) PreservedAnalyses CFGOnlyPrinterPass | |
Variables | |
static cl::opt< std::string > | CFGFuncName ("cfg-func-name", cl::Hidden, cl::desc("The name of a function (or its substring)" " whose CFG is viewed/printed.")) |
static cl::opt< std::string > | CFGDotFilenamePrefix ("cfg-dot-filename-prefix", cl::Hidden, cl::desc("The prefix used for the CFG dot file names.")) |
static cl::opt< bool > | HideUnreachablePaths ("cfg-hide-unreachable-paths", cl::init(false)) |
static cl::opt< bool > | HideDeoptimizePaths ("cfg-hide-deoptimize-paths", cl::init(false)) |
static cl::opt< bool > | ShowHeatColors ("cfg-heat-colors", cl::init(true), cl::Hidden, cl::desc("Show heat colors in CFG")) |
static cl::opt< bool > | UseRawEdgeWeight ("cfg-raw-weights", cl::init(false), cl::Hidden, cl::desc("Use raw weights for labels. " "Use percentages as default.")) |
static cl::opt< bool > | ShowEdgeWeight ("cfg-weights", cl::init(false), cl::Hidden, cl::desc("Show edges labeled with weights")) |
Definition at line 117 of file CFGPrinter.cpp.
References llvm::PreservedAnalyses::all(), llvm::AMDGPUISD::BFI, F(), llvm::getMaxFreq(), and viewCFG().
INITIALIZE_PASS | ( | CFGOnlyViewerLegacyPass | , |
"view-cfg-only" | , | ||
"View CFG of function (with no function bodies)" | , | ||
false | , | ||
true | |||
) |
Definition at line 153 of file CFGPrinter.cpp.
References llvm::PreservedAnalyses::all(), llvm::AMDGPUISD::BFI, F(), llvm::getMaxFreq(), and viewCFG().
INITIALIZE_PASS | ( | CFGPrinterLegacyPass | , |
"dot-cfg" | , | ||
"Print CFG of function to 'dot' file" | , | ||
false | , | ||
true | |||
) |
Definition at line 190 of file CFGPrinter.cpp.
References llvm::PreservedAnalyses::all(), llvm::AMDGPUISD::BFI, F(), llvm::getMaxFreq(), and writeCFGToDotFile().
INITIALIZE_PASS | ( | CFGOnlyPrinterLegacyPass | , |
"dot-cfg-only" | , | ||
"Print CFG of function to 'dot' file (with no function bodies)" | , | ||
false | , | ||
true | |||
) |
Definition at line 226 of file CFGPrinter.cpp.
References llvm::PreservedAnalyses::all(), llvm::AMDGPUISD::BFI, F(), llvm::getMaxFreq(), and writeCFGToDotFile().
|
static |
Definition at line 80 of file CFGPrinter.cpp.
References llvm::AMDGPUISD::BFI, F(), llvm::DOTFuncInfo::setEdgeWeights(), llvm::DOTFuncInfo::setHeatColors(), llvm::DOTFuncInfo::setRawEdgeWeights(), ShowEdgeWeight, ShowHeatColors, UseRawEdgeWeight, and ViewGraph().
Referenced by INITIALIZE_PASS().
|
static |
Definition at line 58 of file CFGPrinter.cpp.
References llvm::AMDGPUISD::BFI, CFGDotFilenamePrefix, llvm::errs(), F(), llvm::sys::fs::F_Text, File, llvm::DOTFuncInfo::setEdgeWeights(), llvm::DOTFuncInfo::setHeatColors(), llvm::DOTFuncInfo::setRawEdgeWeights(), ShowEdgeWeight, ShowHeatColors, UseRawEdgeWeight, and llvm::WriteGraph().
Referenced by INITIALIZE_PASS().
|
static |
Referenced by writeCFGToDotFile().
|
static |
Referenced by llvm::Function::viewCFG().
|
static |
Referenced by viewCFG(), and writeCFGToDotFile().
|
static |
Referenced by viewCFG(), and writeCFGToDotFile().