[all-commits] [llvm/llvm-project] 35714e: [MLGO] Change MBB Profile Dump from using MBB numb...

Aiden Grossman via All-commits all-commits at lists.llvm.org
Fri Apr 14 00:04:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 35714e3a9c6ae6ec63845020babede1860a6d4de
      https://github.com/llvm/llvm-project/commit/35714e3a9c6ae6ec63845020babede1860a6d4de
  Author: Aiden Grossman <agrossman154 at yahoo.com>
  Date:   2023-04-14 (Fri, 14 Apr 2023)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/test/CodeGen/MLRegalloc/bb-profile-dump.ll

  Log Message:
  -----------
  [MLGO] Change MBB Profile Dump from using MBB numbers to MBB IDs

Currenty, setting the -mbb-profile-dump dumps a CSV file with blocks
inside an individual function identified by their MBB numbers. This
patch changes the MBBs to be identified by their ID which is set at MBB
creation and not changed afterwards, making it inherently stable
throughout the backend. This alleviates concerns with the MBB IDs
changing between the profile dump and what ends up in the final object
file. The MBBs inside the SHT_LLVM_BB_ADDR_MAP sections are also
identified using their MBB ID rather than number, so if we want to match
them up we need to identify the MBBs here by number.

Reviewed By: mtrofin, rahmanl

Differential Revision: https://reviews.llvm.org/D147366




More information about the All-commits mailing list