[llvm] [InstrProf] Adding utility weights to BalancedPartitioning (PR #72717)
Ellis Hoag via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 13:55:54 PST 2024
================
@@ -57,8 +57,14 @@ class BPFunctionNode {
friend class BalancedPartitioning;
public:
+ /// The type of ID
using IDT = uint64_t;
- using UtilityNodeT = uint32_t;
+ /// The type of UtilityNode
+ struct UtilityNodeT {
+ UtilityNodeT(uint32_t id, uint32_t weight = 1) : id(id), weight(weight) {}
+ uint32_t id;
+ uint32_t weight;
----------------
ellishg wrote:
Please use CamelCase for variable names.
https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
```suggestion
uint32_t Id;
uint32_t Weight;
```
https://github.com/llvm/llvm-project/pull/72717
More information about the llvm-commits
mailing list