[all-commits] [llvm/llvm-project] f354e9: [MemProf] Clean up MemProf instrumentation pass in...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Fri May 26 17:39:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f354e971b09c244147ff59eb65b34487755598c0
      https://github.com/llvm/llvm-project/commit/f354e971b09c244147ff59eb65b34487755598c0
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2023-05-26 (Fri, 26 May 2023)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M llvm/lib/Passes/PassBuilderPipelines.cpp

  Log Message:
  -----------
  [MemProf] Clean up MemProf instrumentation pass invocation

First, removes the invocation of the memprof instrumentation passes from
the end of the module simplification pass builder, where it doesn't
really belong. However, it turns out that this was never being invoked,
as it is guarded by an internal option not used anywhere (even tests).

These passes are actually added via clang under the -fmemory-profile
option. Changed this to add via the EP callback interface, similar to
the sanitizer passes. They are added to the EP for the end of the
optimization pipeline, which is roughly where they were being added
already (end of the pre-LTO link pipelines and non-LTO optimization
pipeline).

Ideally we should plumb the output file through to LLVM and set it up
there, so I have added a TODO.

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




More information about the All-commits mailing list