[all-commits] [llvm/llvm-project] 4af73d: Refactor AsmPrinterHandler callbacks. NFCI.

James Y Knight via All-commits all-commits at lists.llvm.org
Tue Nov 22 15:27:52 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4af73d7ebb5bf4bc2045d15ae0f4ebce56f2d86f
      https://github.com/llvm/llvm-project/commit/4af73d7ebb5bf4bc2045d15ae0f4ebce56f2d86f
  Author: James Y Knight <jyknight at google.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/AsmPrinterHandler.h
    M llvm/include/llvm/CodeGen/DebugHandlerBase.h
    M llvm/lib/CodeGen/AsmPrinter/AIXException.cpp
    M llvm/lib/CodeGen/AsmPrinter/ARMException.cpp
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfException.h

  Log Message:
  -----------
  Refactor AsmPrinterHandler callbacks. NFCI.

The existing behaviors and callbacks were overlapping and had very
confusing semantics: beginBasicBlock/endBasicBlock were not always
called, beginFragment/endFragment seemed like they were meant to mean
the same thing, but were slightly different, etc. This resulted in
confusing semantics, virtual method overloads, and control flow.

Remove the above, and replace with new beginBasicBlockSection and
endBasicBlockSection callbacks. And document them.

These are always called before the first and after the last blocks in
a function, even when basic-block-sections are disabled.




More information about the All-commits mailing list