[llvm] [LoopInterchange] Fix overflow in cost calculation (PR #111807)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 09:09:22 PST 2024


================
@@ -31,7 +32,7 @@ class ScalarEvolution;
 class SCEV;
 class TargetTransformInfo;
 
-using CacheCostTy = int64_t;
+using CacheCostTy = InstructionCost;
----------------
sjoerdmeijer wrote:

Maybe. I personally don't mind the `CacheCostTy` alias here, think it is quite appropriately named. Thinking about it, maybe it's actually a better name than using InstructionCost here? But I don't have strong opinions so certainly don't mind a search/replace of CacheCostTy with InstructionCost assuming that's what you're suggesting, is that right @fhahn ? 

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


More information about the llvm-commits mailing list