[PATCH] D106336: Fix Threshold overwrite bug in the Oz inlining model features.

Jacob Hegna via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 11:05:50 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1f3e90e12894: Fix Threshold overwrite bug in the Oz inlining model features. (authored by jacobhegna).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106336/new/

https://reviews.llvm.org/D106336

Files:
  llvm/lib/Analysis/InlineCost.cpp


Index: llvm/lib/Analysis/InlineCost.cpp
===================================================================
--- llvm/lib/Analysis/InlineCost.cpp
+++ llvm/lib/Analysis/InlineCost.cpp
@@ -1097,9 +1097,9 @@
     set(InlineCostFeatureIndex::SROASavings, SROACostSavingOpportunities);
 
     if (NumVectorInstructions <= NumInstructions / 10)
-      increment(InlineCostFeatureIndex::Threshold, -1 * VectorBonus);
+      Threshold -= VectorBonus;
     else if (NumVectorInstructions <= NumInstructions / 2)
-      increment(InlineCostFeatureIndex::Threshold, -1 * (VectorBonus / 2));
+      Threshold -= VectorBonus / 2;
 
     set(InlineCostFeatureIndex::Threshold, Threshold);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106336.360213.patch
Type: text/x-patch
Size: 676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210720/70fa1127/attachment.bin>


More information about the llvm-commits mailing list