[all-commits] [llvm/llvm-project] 01909b: [IR] Make Module::setProfileSummary to replace an ...

hjyamauchi via All-commits all-commits at lists.llvm.org
Thu May 21 11:39:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 01909b4e850846bb4cf5226072ccc608c68c9466
      https://github.com/llvm/llvm-project/commit/01909b4e850846bb4cf5226072ccc608c68c9466
  Author: Hiroshi Yamauchi <yamauchi at google.com>
  Date:   2020-05-21 (Thu, 21 May 2020)

  Changed paths:
    M llvm/include/llvm/IR/Module.h
    M llvm/lib/IR/Module.cpp
    M llvm/unittests/IR/ModuleTest.cpp

  Log Message:
  -----------
  [IR] Make Module::setProfileSummary to replace an existing ProfileSummary flag.

Summary:
Module::setProfileSummary currently calls addModuelFlag. This prevents from
updating the ProfileSummary metadata in the module and results in a second
ProfileSummary added instead of replacing an existing one. I don't think this is
the expected behavior. It prevents updating the ProfileSummary and it does not
make sense to have more than one. To address this, add Module::setModuleFlag and
use it from setProfileSummary.

Reviewers: davidxl

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list