On Fri, 2016-11-04 at 19:53 +0100, Bernd Schmidt wrote: > On 11/04/2016 08:14 PM, David Malcolm wrote: > > > > With this, compact dumps omit the trailing (nil) for both regular > > insns > > and for JUMP_INSNs, and omits the surplus newline seen in my > > earlier patch. > > > > It also appears removes the trailing (nil) from expr_list. > > > > Bootstrap®rtest in progress. > > > > OK for trunk if it passes? > > This seems OK, with something left to be addressed perhaps in a > followup: > > > + case JUMP_INSN: > > + return JUMP_LABEL (in_rtx) == NULL_RTX; > > Weren't we going to omit JUMP_LABELs in compact mode? If so, we'll > need > a m_compact test here eventually as well.
We already omit JUMP_LABELs in compact mode, in rtx_writer::print_rtx_operand_code_0, but we need this test to pass so that we can potentially omit earlier (nil) operands in a JUMP_INSN e.g. REG_NOTES. Given that, perhaps this test should read: case JUMP_INSN: /* JUMP_LABELs are always omitted in compact mode, so treat any value here as omittable, so that earlier operands can potentially be omitted also. */ return true; or: return m_compact; if we want to support calling operand_has_default_value_p in non -compact mode. OK with one of those changes? (assuming successful testing)