This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Set has_volatile_ops only where neccessary, independent of alias grouping


On 8/31/07, Richard Guenther <rguenther@suse.de> wrote:

> Index: tree-ssa-operands.c
> ===================================================================
> *** tree-ssa-operands.c (revision 127968)
> --- tree-ssa-operands.c (working copy)
> *************** add_virtual_operand (tree var, stmt_ann_
> *** 1466,1476 ****
>     /* Mark the statement as having memory operands.  */
>     s_ann->references_memory = true;
>
> -   /* Mark statements with volatile operands.  Optimizers should back
> -      off from statements having volatile operands.  */
> -   if (TREE_THIS_VOLATILE (sym) && s_ann)
> -     s_ann->has_volatile_ops = true;
> -

I'm not sure about this one.  If we are adding a volatile name tag to
the statement, it should be marked as having volatile operands.

volatile int *p = (i > 10) ? &x : &y;
*p = 3;

The assignment should be marked as having volatile operands.  The tag
for 'p' will be volatile but ISTM that we won't mark the statement
now.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]