Re: INSN_UIDs again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-20 Thread Bernd Schmidt
On 10/20/2016 03:55 PM, David Malcolm wrote: Currently the jump insn in question looks like this: (cjump_insn (set (pc) (label_ref 20)) (nil)) With explicit INSN_UIDs it would look like this: (cjump_insn 13 (set (pc)

Re: INSN_UIDs again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-20 Thread Bernd Schmidt
On 10/20/2016 04:20 PM, David Malcolm wrote: What kind of comparison would it do? Use read-rtl to read the "after" representation and compare it on the fly to what we actually have after running the pass under test. Bernd

Re: INSN_UIDs again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-20 Thread David Malcolm
On Thu, 2016-10-20 at 16:11 +0200, Bernd Schmidt wrote: > On 10/20/2016 03:55 PM, David Malcolm wrote: > > Currently the jump insn in question looks like this: > > > > (cjump_insn (set (pc) > > (label_ref 20)) > > (nil)) > > > > With explicit INSN_UIDs

INSN_UIDs again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-20 Thread David Malcolm
On Thu, 2016-10-06 at 15:30 +0200, Bernd Schmidt wrote: > On 10/05/2016 06:15 PM, David Malcolm wrote: > > +;; MEM[(struct isl_obj *)] = _obj_map_vtable; > > +(insn 1045 0 1046 2 (set (reg:SI 480) > > +(high:SI (symbol_ref:SI ("isl_obj_map_vtable") > > +[flags 0xc0] > >

Re: RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-19 Thread David Malcolm
On Wed, 2016-10-19 at 19:22 +0200, Bernd Schmidt wrote: > On 10/19/2016 07:19 PM, David Malcolm wrote: > > I already dropped LABEL_NUSES in compact mode in r241120; I think > > it's > > possible to regenerate that information. > > > > But how would we go about recreating the JUMP_LABEL data? As

Re: RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-19 Thread Bernd Schmidt
On 10/19/2016 07:19 PM, David Malcolm wrote: I already dropped LABEL_NUSES in compact mode in r241120; I think it's possible to regenerate that information. But how would we go about recreating the JUMP_LABEL data? As far as I can tell, it can be set up by reorg.c:make_return_insns via

Re: RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-19 Thread David Malcolm
On Wed, 2016-10-19 at 16:41 +0200, Bernd Schmidt wrote: > On 10/19/2016 04:35 PM, David Malcolm wrote: > > > In r241120 I dropped all dumping of the JUMP_LABEL when adding the > > "compact" mode. > > > > I'm now running into an issue with this as I update the __RTL in > > cc1 > > tests to use

Re: RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-19 Thread Bernd Schmidt
On 10/19/2016 04:35 PM, David Malcolm wrote: In r241120 I dropped all dumping of the JUMP_LABEL when adding the "compact" mode. I'm now running into an issue with this as I update the __RTL in cc1 tests to use the new format, since various passes require the JUMP_INSNs to have JUMP_LABEL data.

Re: RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-19 Thread David Malcolm
On Fri, 2016-10-07 at 15:58 +0200, Bernd Schmidt wrote: > On 10/07/2016 03:26 PM, David Malcolm wrote: > > > > We could simply print the INSN_UID for CODE_LABELs; something like > > this > > (see the "(code_label 16" below): > > I think that should work. > > > You appear to have trimmed the

Re: RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-07 Thread David Malcolm
On Fri, 2016-10-07 at 15:58 +0200, Bernd Schmidt wrote: > On 10/07/2016 03:26 PM, David Malcolm wrote: > > > > We could simply print the INSN_UID for CODE_LABELs; something like > > this > > (see the "(code_label 16" below): > > I think that should work. OK: we'll keep the INSN_UID for

Re: RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-07 Thread Bernd Schmidt
On 10/07/2016 03:26 PM, David Malcolm wrote: We could simply print the INSN_UID for CODE_LABELs; something like this (see the "(code_label 16" below): I think that should work. You appear to have trimmed the idea of enclosing the insns with (basic-block) directives without commenting on it.

Re: RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-07 Thread David Malcolm
On Fri, 2016-10-07 at 12:38 +0200, Bernd Schmidt wrote: > On 10/06/2016 09:53 PM, David Malcolm wrote: > > A benefit of keeping the INSN_UIDs is that if you've spent half an > > hour > > single-stepping through RTL modification and know that INSN_UID > > 1045 is > > the one that gets corrupted,

Re: RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-07 Thread Bernd Schmidt
On 10/06/2016 09:53 PM, David Malcolm wrote: A benefit of keeping the INSN_UIDs is that if you've spent half an hour single-stepping through RTL modification and know that INSN_UID 1045 is the one that gets corrupted, you can have that insn have UID 1045 in the testcase. Otherwise the UIDs get

Re: RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-06 Thread David Malcolm
On Thu, 2016-10-06 at 15:53 -0400, David Malcolm wrote: > On Thu, 2016-10-06 at 15:30 +0200, Bernd Schmidt wrote: > > On 10/05/2016 06:15 PM, David Malcolm wrote: > > > +;; MEM[(struct isl_obj *)] = _obj_map_vtable; > > > +(insn 1045 0 1046 2 (set (reg:SI 480) > > > +(high:SI

RTL frontend input format again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader)

2016-10-06 Thread David Malcolm
On Thu, 2016-10-06 at 15:30 +0200, Bernd Schmidt wrote: > On 10/05/2016 06:15 PM, David Malcolm wrote: > > +;; MEM[(struct isl_obj *)] = _obj_map_vtable; > > +(insn 1045 0 1046 2 (set (reg:SI 480) > > +(high:SI (symbol_ref:SI ("isl_obj_map_vtable") > > +[flags 0xc0] > >

Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader

2016-10-06 Thread Bernd Schmidt
Let me just make a first pass over this for minor/obvious issues. +we have little control of the input to that specific pass. We "control over" maybe? +The testsuite is below @file{gcc/testsuite/rtl.dg}. Not sure this needs to be in the manual (I have similar doubts about the entire

Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader

2016-10-06 Thread Bernd Schmidt
On 10/05/2016 06:15 PM, David Malcolm wrote: +;; MEM[(struct isl_obj *)] = _obj_map_vtable; +(insn 1045 0 1046 2 (set (reg:SI 480) +(high:SI (symbol_ref:SI ("isl_obj_map_vtable") +[flags 0xc0] +))) + y.c:12702 -1 + (nil)) +(insn 1046 1045

[PATCH 15/16] RTL frontend (rtl1), on top of dump reader

2016-10-05 Thread David Malcolm
This patch implements the RTL frontend, using the function_reader class from earlier in the patch kit. Compared to this patch in v1 of the kit, most of the work has been split into earlier patches. Other changes relative to v1 include: * fix autodeps (by renaming RTL_OBJS to rtl_OBJS in