[all-commits] [llvm/llvm-project] e25f4e: [PseudoProbe] Do not emit pseudo probes when modul...

Hongtao Yu via All-commits all-commits at lists.llvm.org
Fri Mar 25 13:00:19 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e25f4e4c4a6df1d9f84e9506d2391fb0019bc941
      https://github.com/llvm/llvm-project/commit/e25f4e4c4a6df1d9f84e9506d2391fb0019bc941
  Author: Hongtao Yu <hoy at fb.com>
  Date:   2022-03-25 (Fri, 25 Mar 2022)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/Linker/IRMover.cpp
    M llvm/test/ThinLTO/X86/pseudo-probe-desc-import.ll

  Log Message:
  -----------
  [PseudoProbe] Do not emit pseudo probes when module is not probed.

There is a case when a function has pseudo probe intrinsics but the module it resides does not have the probe desc. This could happen when the current module is not built with `-fpseudo-probe-for-profiling` while a function in it calls some other function from a probed module. In thinLTO mode, the callee function could be imported and inlined into the current function.
While this is undefined behavior, I'm fixing the asm printer to not ICE and warn user about this.

Reviewed By: wenlei

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




More information about the All-commits mailing list