[clang] [llvm] [clang-tools-extra] [LoopVectorize] Refine runtime memory check costs when there is an outer loop (PR #76034)

2024-01-18 Thread Rin Dobrescu via cfe-commits
https://github.com/Rin18 commented: One small comment, but otherwise LGTM! I'll leave someone else more familiar with the code to approve the change. https://github.com/llvm/llvm-project/pull/76034 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[llvm] [clang] [clang-tools-extra] [LoopVectorize] Refine runtime memory check costs when there is an outer loop (PR #76034)

2024-01-18 Thread Rin Dobrescu via cfe-commits
https://github.com/Rin18 edited https://github.com/llvm/llvm-project/pull/76034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] [LoopVectorize] Refine runtime memory check costs when there is an outer loop (PR #76034)

2024-01-18 Thread Rin Dobrescu via cfe-commits
@@ -2076,16 +2081,61 @@ class GeneratedRTChecks { LLVM_DEBUG(dbgs() << " " << C << " for " << I << "\n"); RTCheckCost += C; } -if (MemCheckBlock) +if (MemCheckBlock) { + InstructionCost MemCheckCost = 0; for (Instruction &I : *MemChec