[llvm] [SimplifyCFG] Increase budget for FoldTwoEntryPHINode() if the branch is unpredictable. (PR #98495)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 03:55:59 PDT 2024


================
@@ -6756,3 +6756,8 @@ InstructionCost X86TTIImpl::getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
     return AM.Scale != 0;
   return -1;
 }
+
+InstructionCost X86TTIImpl::getBranchMispredictPenalty() const {
+  // TODO: Hook MispredictPenalty of SchedMachineModel into this.
+  return 14;
----------------
nikic wrote:

How did you arrive at the value 14? Why is the TODO a TODO and not implemented in this PR?

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


More information about the llvm-commits mailing list