This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] Two small tree optimizations
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: [RFA] Two small tree optimizations
- From: Raja R Harinath <harinath at cs dot umn dot edu>
- Date: Sun, 28 Oct 2001 18:23:26 -0600
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20011028234617.A7509@daikokuya.demon.co.uk>
Neil Booth <neil@daikokuya.demon.co.uk> writes:
[snip]
> switch (code)
> {
> @@ -2491,9 +2485,17 @@ build1 (code, type, node)
> break;
>
> default:
> - if (TREE_CODE_CLASS (code) == '1' && node && TREE_CONSTANT (node))
> - TREE_CONSTANT (t) = 1;
> - break;
> + if (node)
> + {
> + if (first_rtl_op (code) != 0)
> + {
> + TREE_SIDE_EFFECTS (t) = TREE_SIDE_EFFECTS (node);
> + TREE_READONLY (t) = TREE_READONLY (node);
> + }
> + if (TREE_CODE_CLASS (code) == '1' && TREE_CONSTANT (node))
> + TREE_CONSTANT (t) = 1;
> + break;
> + } ^^^^^^
> }
Stylistically, wouldn't it be better to put the break outside the if.
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash