diff options
author | Kenneth Graunke <[email protected]> | 2015-04-02 16:15:11 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-04-07 14:34:13 -0700 |
commit | 900498bd111091dfda79d5ca6d84fffd427a866d (patch) | |
tree | aa64ceb945dbb5ae53deeb95d8fa03ef0f263cf3 /src/glsl/nir/nir_to_ssa.c | |
parent | b05d53404ccfe28b0011e93c388e5e5b8beaf6db (diff) |
nir: Allocate nir_phi_src values out of the nir_phi_instr.
Phi sources are part of the phi instruction and should have the same
lifetime.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_to_ssa.c')
-rw-r--r-- | src/glsl/nir/nir_to_ssa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/nir/nir_to_ssa.c b/src/glsl/nir/nir_to_ssa.c index 47cf45393e0..53ff547669d 100644 --- a/src/glsl/nir/nir_to_ssa.c +++ b/src/glsl/nir/nir_to_ssa.c @@ -47,7 +47,7 @@ insert_trivial_phi(nir_register *reg, nir_block *block, void *mem_ctx) set_foreach(block->predecessors, entry) { nir_block *pred = (nir_block *) entry->key; - nir_phi_src *src = ralloc(mem_ctx, nir_phi_src); + nir_phi_src *src = ralloc(instr, nir_phi_src); src->pred = pred; src->src.is_ssa = false; src->src.reg.base_offset = 0; |