summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_to_ssa.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-04-02 16:15:11 -0700
committerKenneth Graunke <[email protected]>2015-04-07 14:34:13 -0700
commit900498bd111091dfda79d5ca6d84fffd427a866d (patch)
treeaa64ceb945dbb5ae53deeb95d8fa03ef0f263cf3 /src/glsl/nir/nir_to_ssa.c
parentb05d53404ccfe28b0011e93c388e5e5b8beaf6db (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.c2
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;