diff options
author | Kenneth Graunke <[email protected]> | 2015-03-27 19:50:29 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-04-07 14:34:14 -0700 |
commit | a10d493715cc3669a6e7647c5e514a386de886c0 (patch) | |
tree | 0da325c4516b49df0b66625c153f644f2507b3aa /doxygen/.gitignore | |
parent | de2014cf1e12826a53a1132f6d80c889f375b2e8 (diff) |
nir: Implement a nir_sweep() pass.
This pass performs a mark and sweep pass over a nir_shader's associated
memory - anything still connected to the program will be kept, and any
dead memory we dropped on the floor will be freed.
The expectation is that this will be called when finished building and
optimizing the shader. However, it's also fine to call it earlier, and
many times, to free up memory earlier.
v2: (feedback from Jason Ekstrand)
- Skip sweeping impl->start_block, as it's already in the CF list.
- Don't sweep SSA defs (they're owned by their defining instruction)
- Don't steal phi sources (they're owned by nir_phi_instr).
- Don't steal tex->src (it's owned by the tex_inst itself)
- Don't sweep dereference chains (top-level dereferences are owned by
the instruction; sub-dereferences are owned by the parent deref).
- Don't sweep sources and destinations (SSA defs are handled as part of
the defining instruction, and registers are handled as part of
function implementations).
- Just steal instructions; don't walk them (no longer required).
v3: (feedback from Jason Ekstrand)
- Steal indirect sources from nir_src/nir_dest.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'doxygen/.gitignore')
0 files changed, 0 insertions, 0 deletions