[PATCH] D143942: [NFC] Replace -1U{LL} expressions with appropriate *_MAX macros in Support library.
    Pavel Kopyl via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Feb 13 14:07:12 PST 2023
    
    
  
pavelkopyl added inline comments.
================
Comment at: llvm/include/llvm/Support/BlockFrequency.h:31
   /// Returns the maximum possible frequency, the saturation value.
-  static uint64_t getMaxFrequency() { return -1ULL; }
+  static uint64_t getMaxFrequency() { return ULLONG_MAX; }
 
----------------
craig.topper wrote:
> Why not `UINT64_MAX`?
Sure, that's possible (and <climits> is not required in this case), but I just wanted to preserve ULL type of the constant. Yep, probably UINT64_MAX looks more natural taking into account the destination type.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143942/new/
https://reviews.llvm.org/D143942
    
    
More information about the llvm-commits
mailing list