[PATCH] D79902: [IR] Make Module::setProfileSummary to replace an existing ProfileSummary flag.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 12:31:36 PDT 2020


yamauchi created this revision.
yamauchi added a reviewer: davidxl.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79902

Files:
  llvm/include/llvm/IR/Module.h
  llvm/lib/IR/Module.cpp
  llvm/unittests/IR/ModuleTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79902.263825.patch
Type: text/x-patch
Size: 4502 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200513/511c33c4/attachment-0001.bin>


More information about the llvm-commits mailing list