From 8869f44e9a8b53b008fc31583291446ad4d54497 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Mon, 19 Aug 2019 18:05:39 +0300 Subject: [PATCH] nir/loop_unroll: Update the comments for loop_prepare_for_unroll The comments say that we should remove continue if it is the last intruction in a loop however we remove any kind of jump. Signed-off-by: Danylo Piliaiev Reviewed-by: Timothy Arceri --- src/compiler/nir/nir_opt_loop_unroll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_opt_loop_unroll.c b/src/compiler/nir/nir_opt_loop_unroll.c index 55075824507..755ed555c03 100644 --- a/src/compiler/nir/nir_opt_loop_unroll.c +++ b/src/compiler/nir/nir_opt_loop_unroll.c @@ -42,7 +42,7 @@ * to keep track of and update phis along the way which gets tricky and * doesn't add much value over converting to regs. * - * The loop may have a continue instruction at the end of the loop which does + * The loop may have a jump instruction at the end of the loop which does * nothing. Once we're out of SSA, we can safely delete it so we don't have * to deal with it later. */ @@ -67,7 +67,7 @@ loop_prepare_for_unroll(nir_loop *loop) nir_lower_phis_to_regs_block(block_after_loop); - /* Remove continue if its the last instruction in the loop */ + /* Remove jump if it's the last instruction in the loop */ nir_instr *last_instr = nir_block_last_instr(nir_loop_last_block(loop)); if (last_instr && last_instr->type == nir_instr_type_jump) { nir_instr_remove(last_instr); -- 2.30.2