[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 29 04:39:51 PDT 2025
================
@@ -55,6 +55,15 @@ using namespace llvm;
#define DEBUG_TYPE "asm-printer"
extern cl::opt<bool> WasmKeepRegisters;
+// values are divided by 1<<31 to calculate the probability
+static cl::opt<uint32_t> WasmHighBranchProb(
+ "wasm-branch-prob-high", cl::Hidden,
+ cl::desc("lowest branch probability to not be annotated as likely taken"),
+ cl::init(0x40000000));
----------------
aengelke wrote:
Use floats here? Seems not very intuitive to use the internal integer representation here. Description should also indicate value range.
https://github.com/llvm/llvm-project/pull/146230
More information about the llvm-commits
mailing list