[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

Mingming Liu via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 6 23:23:11 PDT 2024


================
@@ -2538,6 +2538,190 @@ Value *getSalvageOpsForIcmpOp(ICmpInst *Icmp, uint64_t CurrentLocOps,
   return Icmp->getOperand(0);
 }
 
+void llvm::tryToSinkInstructionDbgValues(
----------------
minglotus-6 wrote:

The `gep` and `load` sequence doesn't have debug values (so far) so it's not easy to test within this PR.

IMO helper functions that handles debug value along instruction sink (e.g. https://github.com/llvm/llvm-project/blob/1752740f4b4b752bbe2987a0de398c6f671ceb71/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp#L4769) will help other passes (e.g., simplify-cfg, etc) that moves instruction around. And test cases can be added for these shared helper functions.

https://github.com/llvm/llvm-project/pull/81442


More information about the cfe-commits mailing list