This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 02/89] Introduce gimple_switch and use it in various places
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Trevor Saunders <tsaunders at mozilla dot com>
- Cc: David Malcolm <dmalcolm at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 22 Apr 2014 16:17:23 +0200
- Subject: Re: [PATCH 02/89] Introduce gimple_switch and use it in various places
- Authentication-results: sourceware.org; auth=none
- References: <1398099480-49147-1-git-send-email-dmalcolm at redhat dot com> <1398099480-49147-3-git-send-email-dmalcolm at redhat dot com> <20140421224535 dot GA19895 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com>
On Tue, Apr 22, 2014 at 12:45 AM, Trevor Saunders <tsaunders@mozilla.com> wrote:
>> --- a/gcc/tree-loop-distribution.c
>> +++ b/gcc/tree-loop-distribution.c
>> @@ -687,8 +687,9 @@ generate_loops_for_partition (struct loop *loop, partition_t partition,
>> }
>> else if (gimple_code (stmt) == GIMPLE_SWITCH)
>> {
>> + gimple_switch switch_stmt = stmt->as_a_gimple_switch ();
>
> maybe it would make more sense to do
> else if (gimple_switch switch_stmt = stmt->dyn_cast_gimple_switch ())
> ?
_please_ use is_a<> as_a<> etc. from is-a.h instead of member functions.
Richard.
> Trev
>