[llvm] [Support] Always scale InstructionCost::Value (PR #178962)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 8 23:51:03 PDT 2026


================
@@ -59,6 +59,9 @@ class InstructionCost {
       State = Invalid;
   }
 
+  // Matches GCC, can use shift rather than multiply/divide to scale
+  static constexpr CostType ScalingFactor = 4;
----------------
wangpc-pp wrote:

Would it be more intuitive to rename `ScalingFactor` to `CostGranularity`?

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


More information about the llvm-commits mailing list