[all-commits] [llvm/llvm-project] aeec2c: [VPlan] Speed up VPSlotTracker by using ModuleSlot...
Igor Kirillov via All-commits
all-commits at lists.llvm.org
Thu Jun 26 14:41:10 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aeec2c6e489364525a1c293248b7657d7e07726f
https://github.com/llvm/llvm-project/commit/aeec2c6e489364525a1c293248b7657d7e07726f
Author: Igor Kirillov <igor.kirillov at arm.com>
Date: 2025-06-26 (Thu, 26 Jun 2025)
Changed paths:
M llvm/lib/Transforms/Vectorize/VPlan.cpp
M llvm/lib/Transforms/Vectorize/VPlanHelpers.h
Log Message:
-----------
[VPlan] Speed up VPSlotTracker by using ModuleSlotTracker (#139881)
Currently, when VPSlotTracker is initialized with a VPlan, its
assignName method calls printAsOperand on each underlying instruction.
Each such call recomputes slot numbers for the entire function, leading
to O(N × M) complexity, where M is the number of instructions in the
loop and N is the number of instructions in the function.
This results in slow debug output for large loops. For example, printing
costs of all instructions becomes O(M² × N), which is especially painful
when enabling verbose dumps.
This patch improves debugging performance by caching slot numbers using
ModuleSlotTracker. It avoids redundant recomputation and makes debug
output significantly faster.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list