[PATCH] D144306: [BOLT] adding hash computation for basic blocks
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 26 12:54:52 PDT 2023
Amir added inline comments.
================
Comment at: bolt/lib/Core/HashUtilities.cpp:127-129
+ // FIXME: Is there a more robust method to unify opcodes?
+ if (IsX86 && BC.MIB->isConditionalBranch(Inst))
+ Opcode = 1259;
----------------
Please use MIB->getShortBranchOpcode interface here
================
Comment at: bolt/lib/Core/HashUtilities.cpp:134-138
+ while (Opcode) {
+ uint8_t LSB = Opcode & 0xff;
+ HashString.push_back(LSB);
+ Opcode = Opcode >> 8;
+ }
----------------
As a note: I want to switch to using instruction mnemonic instead of opcode value. It shouldn'
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144306/new/
https://reviews.llvm.org/D144306
More information about the llvm-commits
mailing list