[llvm] Avoid BlockFrequency overflow problems (PR #66280)
    Matthias Braun via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep 13 13:33:57 PDT 2023
    
    
  
================
@@ -76,6 +78,12 @@ class BlockFrequency {
     return NewFreq;
   }
 
+  /// Multiplies frequency with `Factor` and stores the result into `Result`.
+  /// Returns `true` if an overflow occured. Overflows are common and should be
+  /// checked by all callers.
+  bool mul(uint64_t Factor,
----------------
MatzeB wrote:
Somehow I know `__attribute__((...))`s better than C++17 :) Will switch, great to see this feature in the standard!
https://github.com/llvm/llvm-project/pull/66280
    
    
More information about the llvm-commits
mailing list