[PATCH] D90539: Make CallInst::updateProfWeight emit i32 weights instead of i64
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 14:29:58 PST 2020
dexonsmith added a comment.
In D90539#2389866 <https://reviews.llvm.org/D90539#2389866>, @aeubanks wrote:
> Ping
> We can always fix everything to use i64 in a follow-up change, but for now I'd like to fix entry_counts_cold.ll under the NPM.
I agree this should be fixed separately from updating the world (that could be before or after this patch). I'm also a bit skeptical that it's valuable to have more than `i32` for branch weights.
================
Comment at: llvm/lib/IR/Instructions.cpp:564
Vals.push_back(MDB.createConstant(ConstantInt::get(
- Type::getInt64Ty(getContext()), Val.udiv(APT).getLimitedValue())));
+ Type::getInt32Ty(getContext()), Val.udiv(APT).getLimitedValue())));
} else if (ProfDataName->getString().equals("VP"))
----------------
I think you need `getLimitedValue(UINT32_MAX)` here. Can you add a test that covers that as well?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90539/new/
https://reviews.llvm.org/D90539
More information about the llvm-commits
mailing list