[all-commits] [llvm/llvm-project] 417bcb: [Instruction] Remove setProfWeight()

Yevgeny Rouban via All-commits all-commits at lists.llvm.org
Thu Jun 4 01:11:58 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 417bcb8827671da271e5b745ad189e2ba978f776
      https://github.com/llvm/llvm-project/commit/417bcb8827671da271e5b745ad189e2ba978f776
  Author: Yevgeny Rouban <yrouban at azul.com>
  Date:   2020-06-04 (Thu, 04 Jun 2020)

  Changed paths:
    M llvm/include/llvm/IR/Instruction.h
    M llvm/lib/IR/Instruction.cpp
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/cast-call-combine-prof.ll

  Log Message:
  -----------
  [Instruction] Remove setProfWeight()

Remove the function Instruction::setProfWeight() and make
use of Instruction::copyMetadata(.., {LLVMContext::MD_prof}).
This is correct for all use cases of setProfWeight() as it
is applied to CallBase instructions only.
This change results in prof metadata copied intact even if
the source has "VP". The old pair of calls
extractProfTotalWeight() + setProfWeight() resulted in
setting branch_weights if the source had "VP" data.

Reviewers: yamauchi, davidxl
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80987




More information about the All-commits mailing list