DescriptionMost of the issues so far encountered with the greedy allocator rest with the splitting mechanism. This change has:
- all RegisterAllocatorTest unit tests passing, when unittest has the flags: --turbo-filter=* --always-opt --turbo-deoptimization --turbo-verify-allocation --turbo_greedy_regalloc
./tools/run-tests.py passing when providing --turbo_greedy_regalloc, but still having some failing (more than the "normal" 43) when passing all the flags. I realize just passing --turbo_greedy_regalloc does not provide full coverage, but it did uncover some bugs, still
The CL centralizes the computing of split points (for "losing" intervals) with the determination of whether an interval is irreducible, and, therefore, of infinite spill weight (if an interval can't be split or spilled, it can't lose in weight comparison because there's nothing we can do to it and make progress).
There are allocator efficiency opportunities I haven't yet taken (this refers to the code itself, not the generated code). For example, the above split/spill computation can be cached. My plan is to defer this to at least after we see numbers showing the value of the algorithm, and potentially do at the same time we remove the linear algorithm, if that is still the plan. At that time, we can look where some APIs best belong (e.g. weight computation may fully live and cache itself on LiveRange)
In addition, the CL adds a few debug-time-only Print APIs I found very useful: on demand (while in GDB) dump of the code, live range info (use positions & operand description, and intervals), etc.
BUG=
Committed: https://crrev.com/cd481a7dfdb1b698758d154d01169302992a5443
Cr-Commit-Position: refs/heads/master@{#28185}
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : #Patch Set 5 : #Patch Set 6 : #
Total comments: 11
Patch Set 7 : #
Total comments: 3
Patch Set 8 : #Patch Set 9 : Just a rebase #
Total comments: 10
Patch Set 10 : #
Messages
Total messages: 17 (4 generated)
|