================
@@ -697,6 +738,34 @@ void WebAssemblyAsmPrinter::emitInstruction(const 
MachineInstr *MI) {
     WebAssemblyMCInstLower MCInstLowering(OutContext, *this);
     MCInst TmpInst;
     MCInstLowering.lower(MI, TmpInst);
+    if (Subtarget->hasBranchHinting() &&
+        MI->getOpcode() == WebAssembly::BR_IF && MFI &&
+        MFI->BranchProbabilities.contains(MI)) {
----------------
aengelke wrote:

Avoid duplicate hash table (BranchProbabilities) lookup. Why is the check for 
BR_IF duplicated here? The lookup alone should suffice to determine whether an 
instruction has a branch hint attached.

https://github.com/llvm/llvm-project/pull/146230
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to