Commit de01e65
committed
feat(codegen): WIP Segment-Tree RA with lazy tree + coord compression
- New allocator: PRCoords + PRTree (range-add / range-max with lazy)
- ensureCoordsAndTree(): rebuild-on-new-endpoints + interval replay
- isPhysRegAvailable(): alias-aware; queries new tree after ensuring coords
- updateSegmentTreeForPhysReg(): writes range add to selected physreg
- init/reset: initialize/clear PRCoords/PRTree/PhysRegIntervals
- SlotIndexes dependency handled; pipeline runs to completion
Known gaps:
- Rebuild frequency could be optimized (batch endpoints)
- Legacy MaxEnd helpers still present (unused)
- More tests for alias-heavy and spill cases
Verified:
- llc -O2 -regalloc=segtre produces assembly
- -debug-only=regallocsegtre shows coherent updates/queries
- -verify-machineinstrs passes1 parent 49397ad commit de01e65
File tree
2 files changed
+253
-54
lines changed- llvm
- include/llvm/CodeGen
- lib/CodeGen
2 files changed
+253
-54
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
123 | | - | |
| 127 | + | |
124 | 128 | | |
125 | 129 | | |
126 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
127 | 162 | | |
128 | 163 | | |
129 | 164 | | |
| |||
0 commit comments