[all-commits] [llvm/llvm-project] 12e78f: [InstrProf] Add the skipprofile attribute

Ellis Hoag via All-commits all-commits at lists.llvm.org
Thu Aug 4 08:45:40 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 12e78ff88105f2dc6cb1449d6fcd5d8f69e0512f
      https://github.com/llvm/llvm-project/commit/12e78ff88105f2dc6cb1449d6fcd5d8f69e0512f
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2022-08-04 (Thu, 04 Aug 2022)

  Changed paths:
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/CodeGen/CodeGenPGO.cpp
    M clang/test/CodeGen/profile-function-groups.c
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/Bitcode/LLVMBitCodes.h
    M llvm/include/llvm/IR/Attributes.td
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
    M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    M llvm/test/Bitcode/attributes.ll
    M llvm/test/Transforms/GCOVProfiling/noprofile.ll
    M llvm/test/Transforms/PGOProfile/noprofile.ll

  Log Message:
  -----------
  [InstrProf] Add the skipprofile attribute

As discussed in [0], this diff adds the `skipprofile` attribute to
prevent the function from being profiled while allowing profiled
functions to be inlined into it. The `noprofile` attribute remains
unchanged.

The `noprofile` attribute is used for functions where it is
dangerous to add instrumentation to while the `skipprofile` attribute is
used to reduce code size or performance overhead.

[0] https://discourse.llvm.org/t/why-does-the-noprofile-attribute-restrict-inlining/64108

Reviewed By: phosek

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




More information about the All-commits mailing list