[PATCH] D88609: Use uint64_t for branch weights instead of uint32_t

2020-10-31 Thread dmajor via Phabricator via cfe-commits
dmajor added a comment. After 10f2a0d662d8 our self-host PGO builds are hitting: llvm::BranchProbability::getBranchProbability(uint64_t, uint64_t): Assertion `Numerator <= Denominator && "Probability cannot be bigger than

[PATCH] D88609: Use uint64_t for branch weights instead of uint32_t

2020-10-31 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. The stack trace helped me come up with my own repro, reverting. It's more uint64_t overflow issues. This might be the reason branch_weights were initially i32 with casts in a bunch of places around LLVM. Not sure if I should try and fix all usages or just keep

[PATCH] D88609: Use uint64_t for branch weights instead of uint32_t

2020-10-28 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. This was reverted due to crashes caused by adding branch weights overflowing uint64_t. Now in BranchProbabilityInfo.cpp, if the sum of weights overflows, scale down all weights by UINT32_MAX (See `ScaleWeights()`). Is that ok? Repository: rG LLVM Github Monorepo

[PATCH] D88609: Use uint64_t for branch weights instead of uint32_t

2020-10-27 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a subscriber: thakis. kiranchandramohan added a comment. @thakis Can you revert the testcase fix in MLIR also which was necessary after this patch? https://reviews.llvm.org/rG0fc1aa22ee6ac337a5d51fa5666c9cd61da61b07 Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D88609: Use uint64_t for branch weights instead of uint32_t

2020-10-27 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a comment. Updated mlir test also to include this change. https://reviews.llvm.org/rG0fc1aa22ee6ac337a5d51fa5666c9cd61da61b07 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88609/new/ https://reviews.llvm.org/D88609