From 114049a22031be63da511ea53f4e655fc72a4578 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 27 Oct 2016 03:28:29 -0400 Subject: IR analysis unrolls a complicated loop --- src/ir_print.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ir_print.cpp') diff --git a/src/ir_print.cpp b/src/ir_print.cpp index d1c8bf52e4..8749214f31 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -93,11 +93,15 @@ static void ir_print_const_instruction(IrPrint *irp, IrInstruction *instruction) ir_print_const_value(irp, type_entry, const_val); } +static void ir_print_var_instruction(IrPrint *irp, IrInstruction *instruction) { + fprintf(irp->f, "#%zu", instruction->debug_id); +} + static void ir_print_other_instruction(IrPrint *irp, IrInstruction *instruction) { if (instruction->static_value.ok) { ir_print_const_instruction(irp, instruction); } else { - fprintf(irp->f, "#%zu", instruction->debug_id); + ir_print_var_instruction(irp, instruction); } } @@ -333,7 +337,7 @@ static void ir_print_load_ptr(IrPrint *irp, IrInstructionLoadPtr *instruction) { static void ir_print_store_ptr(IrPrint *irp, IrInstructionStorePtr *instruction) { fprintf(irp->f, "*"); - ir_print_other_instruction(irp, instruction->ptr); + ir_print_var_instruction(irp, instruction->ptr); fprintf(irp->f, " = "); ir_print_other_instruction(irp, instruction->value); } -- cgit v1.2.3