From: Danylo Piliaiev Date: Mon, 19 Aug 2019 15:05:39 +0000 (+0300) Subject: nir/loop_unroll: Update the comments for loop_prepare_for_unroll X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8869f44e9a8b53b008fc31583291446ad4d54497;p=mesa.git 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 --- 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);