This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] TLC to reassoc get_rank
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 May 2015 14:44:05 +0200
- Subject: Re: [PATCH] TLC to reassoc get_rank
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1505291440570 dot 30088 at zhemvz dot fhfr dot qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, May 29, 2015 at 02:41:28PM +0200, Richard Biener wrote:
> @@ -525,7 +498,11 @@ get_rank (tree e)
> return (rank + 1);
> }
>
> - /* Globals, etc, are rank 0 */
> + /* Constants have rank 0. */
> + if (is_gimple_min_invariant (e))
> + return 0;
> +
> + /* Constants, globals, etc., are rank 0 */
> return 0;
> }
This looks weird. No reason to test is_gimple_min_invariant
if it returns 0 no matter whether it is true or false.
Jakub