This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Can we replace uses of vec<TYPE, va_gc> with vec<TYPE> in the backwards threader?
- From: Jeff Law <law at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>, richard dot sandiford at linaro dot org
- Date: Tue, 5 Sep 2017 09:00:55 -0600
- Subject: Re: Can we replace uses of vec<TYPE, va_gc> with vec<TYPE> in the backwards threader?
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 336CCC07C562
- References: <CAGm3qMVhMEwHE0+MpBix8UXvNfsX+A2c3s5kGRaA5jtYfiX7SQ@mail.gmail.com> <98a2815c-9dd8-5a4d-bac6-ee7a6407d1cf@redhat.com> <CAGm3qMXhuTdo+KCsM_SpGmQ81vK0KEbVUjboQ82uELRPHngugw@mail.gmail.com>
On 09/05/2017 06:32 AM, Aldy Hernandez wrote:
> On Wed, Aug 30, 2017 at 10:32 AM, Jeff Law <law@redhat.com> wrote:
>> On 08/30/2017 04:41 AM, Aldy Hernandez wrote:
>
>> If you're looking for further cleanups, pulling the rest of the FSM bits
>> out of tree-ssa-threadupdate.c is ripe. In particular this loop:
>>
>> /* Jump-thread all FSM threads before other jump-threads. */
>> for (i = 0; i < paths.length ();)
>> [ ... ]
>>
>> If that was to get pulled out and moved into tree-ssa-threadbackwards.c,
>> then you can probably skip the step that converts the vector of blocks
>> into a vector of jump_thread_edge which then gets turned into an array
>> of blocks. In theory you just turn the vector of blocks into an array
>> of blocks to match the api for duplicate_thread_path.
>
> Hmm, it seems that the above loop you mention in
> thread_through_all_blocks() still needs to iterate over a global
> vec<jump_thread_edge *> vector ("paths"). So we still need to go
> through a vector of jump edges.
It's just finding the backwards paths that we converted into the
jump_thread_edge form. Then we iterate over the edges in the path to
build an array of blocks.
So instead of converting our vec of blocks into a jump_thread_edge, we
just keep the vec of blocks when we pull that loop out of
tree-ssa-threadupdate.c.
That would also mean the immediately following loop should be dead.
Unless I'm missing something?!?
jeff