[all-commits] [llvm/llvm-project] a32c2c: [NFC] Use Optional<ProfileCount> to model invalid ...
Mircea Trofin via All-commits
all-commits at lists.llvm.org
Sun Nov 14 19:17:52 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a32c2c380863d02eb0fd5e8757a62d96114b9519
https://github.com/llvm/llvm-project/commit/a32c2c380863d02eb0fd5e8757a62d96114b9519
Author: Mircea Trofin <mtrofin at google.com>
Date: 2021-11-14 (Sun, 14 Nov 2021)
Changed paths:
M llvm/include/llvm/IR/Function.h
M llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
M llvm/lib/Analysis/InlineCost.cpp
M llvm/lib/Analysis/ProfileSummaryInfo.cpp
M llvm/lib/CodeGen/MachineSizeOpts.cpp
M llvm/lib/IR/Function.cpp
M llvm/lib/Transforms/IPO/PartialInlining.cpp
M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
M llvm/lib/Transforms/Utils/InlineFunction.cpp
M llvm/unittests/IR/MetadataTest.cpp
Log Message:
-----------
[NFC] Use Optional<ProfileCount> to model invalid counts
ProfileCount could model invalid values, but a user had no indication
that the getCount method could return bogus data. Optional<ProfileCount>
addresses that, because the user must dereference the optional. In
addition, the patch removes concept duplication.
Differential Revision: https://reviews.llvm.org/D113839
More information about the All-commits
mailing list