[all-commits] [llvm/llvm-project] e09b33: [CodeGen] Speedup stack slot sharing during stack ...
Valery via All-commits
all-commits at lists.llvm.org
Wed Apr 5 22:24:09 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e09b33feec1991876a3093d86348818df8b8edae
https://github.com/llvm/llvm-project/commit/e09b33feec1991876a3093d86348818df8b8edae
Author: Valery Pykhtin <valery.pykhtin at gmail.com>
Date: 2023-04-06 (Thu, 06 Apr 2023)
Changed paths:
M llvm/lib/CodeGen/StackSlotColoring.cpp
Log Message:
-----------
[CodeGen] Speedup stack slot sharing during stack coloring (interval overlapping test).
AMDGPU code with enabled address sanitizer generates tons of stack objects (> 200000 in my testcase) and
takes forever to compile due to the time spent on stack slot sharing.
While LiveRange::overlaps method has logarithmic complexity on the number of segments in the involved
liveranges the problem is that when a new interval is assigned to a used color it's tested against
overlapping every other assigned interval for that color.
Instead I decided to join all assigned intervals for a color into a single interval and this allows to
have logarithmic complexity on the number of segments for the joined interval.
This patch reduced time spent on stack slot coloring pass from 628 to 3 seconds on my testcase.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D146057
More information about the All-commits
mailing list