[llvm] [FuncSpec] Update function specialization to handle phi-chains (PR #71442)
    Alexandros Lamprineas via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Nov  7 02:12:56 PST 2023
    
    
  
================
@@ -809,20 +870,40 @@ bool FunctionSpecializer::findSpecializations(Function *F, unsigned FuncSize,
       auto IsProfitable = [](Bonus &B, unsigned Score, unsigned FuncSize,
                              unsigned FuncGrowth) -> bool {
         // No check required.
-        if (ForceSpecialization)
+        if (ForceSpecialization) {
+          LLVM_DEBUG(dbgs() << "Force is on\n");
           return true;
+        }
         // Minimum inlining bonus.
-        if (Score > MinInliningBonus * FuncSize / 100)
+        if (Score > MinInliningBonus * FuncSize / 100) {
+          LLVM_DEBUG(dbgs()
+                     << "FnSpecialization: Min inliningbous: Score = " << Score
----------------
labrinea wrote:
typo: Inlining Bonus
https://github.com/llvm/llvm-project/pull/71442
    
    
More information about the llvm-commits
mailing list