[llvm] [llvm][profdata][NFC] Support 64-bit weights in ProfDataUtils (PR #86607)

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 10:10:52 PDT 2024


MatzeB wrote:

Be careful here! I think there is a bunch of code that is summing up weights and stores intermediate results in a `uint64_t`. This is all fine when the weights are `uint32_t` but risks (silent!) overflow when the weights use the full `uint64_t`. I haven't looked around much but could find one random example in `SimplifyCFG` already: https://github.com/llvm/llvm-project/blob/c8d70e94c4b69e809142054e75b9725ed70418af/llvm/lib/Transforms/Utils/SimplifyCFG.cpp?plain=1#L1221

https://github.com/llvm/llvm-project/pull/86607


More information about the llvm-commits mailing list