mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 12:20:29 +01:00
intel/brw: Skip discarding the interference graph
We no longer need to reserve registers for constructing spill/fill messages. We have split sends and construct message headers in new temporary registers with a very short lifespan which are simply added to the existing interference graph as new nodes and allocated via the normal mechanism. This means that when we need to spill for the first time, we can avoid discarding and recomputing the entire interference graph. We also avoid needing to recreate all spill candidate information once ra_allocate() fails, because the graph remains valid, and none of the existing nodes had any changes to their interference. The existing spill candidates remain valid. This will slightly help improve compile time when needing to spill. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25811>
This commit is contained in:
parent
29d6264627
commit
50519598ff
1 changed files with 3 additions and 12 deletions
|
|
@ -288,7 +288,7 @@ private:
|
|||
int node_start_ip, int node_end_ip);
|
||||
void setup_inst_interference(const fs_inst *inst);
|
||||
|
||||
void build_interference_graph(bool allow_spilling);
|
||||
void build_interference_graph();
|
||||
void discard_interference_graph();
|
||||
|
||||
fs_reg build_lane_offsets(const fs_builder &bld,
|
||||
|
|
@ -510,7 +510,7 @@ fs_reg_alloc::setup_inst_interference(const fs_inst *inst)
|
|||
}
|
||||
|
||||
void
|
||||
fs_reg_alloc::build_interference_graph(bool allow_spilling)
|
||||
fs_reg_alloc::build_interference_graph()
|
||||
{
|
||||
/* Compute the RA node layout */
|
||||
node_count = 0;
|
||||
|
|
@ -1073,7 +1073,7 @@ fs_reg_alloc::spill_reg(unsigned spill_reg)
|
|||
bool
|
||||
fs_reg_alloc::assign_regs(bool allow_spilling, bool spill_all)
|
||||
{
|
||||
build_interference_graph(fs->spilled_any_registers || spill_all);
|
||||
build_interference_graph();
|
||||
|
||||
unsigned spilled = 0;
|
||||
while (1) {
|
||||
|
|
@ -1107,15 +1107,6 @@ fs_reg_alloc::assign_regs(bool allow_spilling, bool spill_all)
|
|||
break;
|
||||
}
|
||||
|
||||
/* If we're going to spill but we've never spilled before, we need
|
||||
* to re-build the interference graph with MRFs enabled to allow
|
||||
* spilling.
|
||||
*/
|
||||
if (!fs->spilled_any_registers) {
|
||||
discard_interference_graph();
|
||||
build_interference_graph(true);
|
||||
}
|
||||
|
||||
spill_reg(reg);
|
||||
spilled++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue