[all-commits] [llvm/llvm-project] 6e23cd: [InstrProf][NFC] Save profile bias to function map

Ellis Hoag via All-commits all-commits at lists.llvm.org
Mon May 16 08:32:47 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e23cd2bf073ab5eb5a103b935af54046d007c52
      https://github.com/llvm/llvm-project/commit/6e23cd2bf073ab5eb5a103b935af54046d007c52
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2022-05-16 (Mon, 16 May 2022)

  Changed paths:
    M llvm/include/llvm/Transforms/Instrumentation/InstrProfiling.h
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp

  Log Message:
  -----------
  [InstrProf][NFC] Save profile bias to function map

Add a map from functions to load instructions that compute the profile bias. Previously we assumed that if the first instruction in the function was a load instruction, then it must be computing the bias. This was likely to work out because functions usually start with the `llvm.instrprof.increment` instruction, but optimizations could change this. For example, inlining into a non-profiled function.

Reviewed By: phosek

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




More information about the All-commits mailing list