[llvm] [ProfileData] Simplify InstrProfValueSiteRecord (NFC) (PR #95143)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 09:50:05 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-pgo
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
std::list default-constructs itself as an empty list, so we don't need
to call ValueData.clear() in the constructor.
---
Full diff: https://github.com/llvm/llvm-project/pull/95143.diff
1 Files Affected:
- (modified) llvm/include/llvm/ProfileData/InstrProf.h (+1-1)
``````````diff
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h
index d6831eeaa794b..dae2caf0181e4 100644
--- a/llvm/include/llvm/ProfileData/InstrProf.h
+++ b/llvm/include/llvm/ProfileData/InstrProf.h
@@ -797,7 +797,7 @@ struct InstrProfValueSiteRecord {
/// Value profiling data pairs at a given value site.
std::list<InstrProfValueData> ValueData;
- InstrProfValueSiteRecord() { ValueData.clear(); }
+ InstrProfValueSiteRecord() = default;
template <class InputIterator>
InstrProfValueSiteRecord(InputIterator F, InputIterator L)
: ValueData(F, L) {}
``````````
</details>
https://github.com/llvm/llvm-project/pull/95143
More information about the llvm-commits
mailing list