diff options
author | paperchalice <liujunchang97@outlook.com> | 2023-12-12 09:22:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 09:22:01 +0800 |
commit | 4d8bf6ea7fa8f68f46b6f0b6d0ae7d114904914a (patch) | |
tree | c5e87c2a5cfb0753147eba967b45a48007dc99e9 /llvm/lib/CodeGen/TargetPassConfig.cpp | |
parent | 62b21c6ced918c7fec97b557e3087e3ffdf71494 (diff) | |
download | llvm-4d8bf6ea7fa8f68f46b6f0b6d0ae7d114904914a.zip llvm-4d8bf6ea7fa8f68f46b6f0b6d0ae7d114904914a.tar.gz llvm-4d8bf6ea7fa8f68f46b6f0b6d0ae7d114904914a.tar.bz2 |
[CodeGen][GC] Remove `GCInfoPrinter` (#75033)
This pass is broken and looks like no one uses it for the last 15+ years.
```c++
bool Printer::runOnFunction(Function &F) {
if (F.hasGC())
return false;
GCFunctionInfo *FD = &getAnalysis<GCModuleInfo>().getFunctionInfo(F);
```
```c++
GCFunctionInfo &GCModuleInfo::getFunctionInfo(const Function &F) {
assert(!F.isDeclaration() && "Can only get GCFunctionInfo for a definition!");
assert(F.hasGC()); // Equivalent to `assert(false);` when called by `Printer::runOnFunction`
```
See also #74972.
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 1f7c949..b82fe5f 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -113,10 +113,9 @@ static cl::opt<bool> DisableMergeICmps("disable-mergeicmps", cl::init(false), cl::Hidden); static cl::opt<bool> PrintLSR("print-lsr-output", cl::Hidden, cl::desc("Print LLVM IR produced by the loop-reduce pass")); -static cl::opt<bool> PrintISelInput("print-isel-input", cl::Hidden, - cl::desc("Print LLVM IR input to isel pass")); -static cl::opt<bool> PrintGCInfo("print-gc", cl::Hidden, - cl::desc("Dump garbage collector data")); +static cl::opt<bool> + PrintISelInput("print-isel-input", cl::Hidden, + cl::desc("Print LLVM IR input to isel pass")); static cl::opt<cl::boolOrDefault> VerifyMachineCode("verify-machineinstrs", cl::Hidden, cl::desc("Verify generated machine code")); @@ -491,7 +490,6 @@ CGPassBuilderOption llvm::getCGPassBuilderOption() { SET_BOOLEAN_OPTION(DisableSelectOptimize) SET_BOOLEAN_OPTION(PrintLSR) SET_BOOLEAN_OPTION(PrintISelInput) - SET_BOOLEAN_OPTION(PrintGCInfo) return Opt; } @@ -1211,10 +1209,7 @@ void TargetPassConfig::addMachinePasses() { } // GC - if (addGCPasses()) { - if (PrintGCInfo) - addPass(createGCInfoPrinter(dbgs())); - } + addGCPasses(); // Basic block placement. if (getOptLevel() != CodeGenOptLevel::None) |