[llvm] [ThinLTO] Add tail call flag to call edges in summary (PR #74043)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 15:54:36 PST 2023
================
@@ -68,21 +68,31 @@ struct CalleeInfo {
// added to HotnessType enum.
uint32_t Hotness : 3;
+ // True if at least one of the calls to the callee is a tail call.
+ bool HasTailCall : 1;
+
/// The value stored in RelBlockFreq has to be interpreted as the digits of
/// a scaled number with a scale of \p -ScaleShift.
- uint32_t RelBlockFreq : 29;
+ static constexpr unsigned RelBlockFreqBits = 28;
+ uint32_t RelBlockFreq : RelBlockFreqBits;
static constexpr int32_t ScaleShift = 8;
- static constexpr uint64_t MaxRelBlockFreq = (1 << 29) - 1;
+ static constexpr uint64_t MaxRelBlockFreq = (1 << RelBlockFreqBits) - 1;
CalleeInfo()
- : Hotness(static_cast<uint32_t>(HotnessType::Unknown)), RelBlockFreq(0) {}
- explicit CalleeInfo(HotnessType Hotness, uint64_t RelBF)
- : Hotness(static_cast<uint32_t>(Hotness)), RelBlockFreq(RelBF) {}
+ : Hotness(static_cast<uint32_t>(HotnessType::Unknown)),
+ HasTailCall(false), RelBlockFreq(0) {}
----------------
snehasish wrote:
Ah, we are not yet on c++20. Thanks for checking.
https://github.com/llvm/llvm-project/pull/74043
More information about the llvm-commits
mailing list