[all-commits] [llvm/llvm-project] 4d8bf6: [CodeGen][GC] Remove `GCInfoPrinter` (#75033)

paperchalice via All-commits all-commits at lists.llvm.org
Mon Dec 11 17:22:14 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d8bf6ea7fa8f68f46b6f0b6d0ae7d114904914a
      https://github.com/llvm/llvm-project/commit/4d8bf6ea7fa8f68f46b6f0b6d0ae7d114904914a
  Author: paperchalice <liujunchang97 at outlook.com>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachinePassRegistry.def
    M llvm/include/llvm/CodeGen/Passes.h
    M llvm/include/llvm/Target/CGPassBuilderOption.h
    M llvm/lib/CodeGen/GCMetadata.cpp
    M llvm/lib/CodeGen/TargetPassConfig.cpp

  Log Message:
  -----------
  [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.




More information about the All-commits mailing list