This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix processing of ADDR_EXPR in get_expr_operands
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dnovillo at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Jul 04 22:38:53 EDT
- Subject: Re: Fix processing of ADDR_EXPR in get_expr_operands
> I still haven't seen an answer to why we're not marking addresses of
> volatile as constant, which I think is the real bug here.
Invariant addresses are supposed to be marked with TREE_INVARIANT, not
TREE_CONSTANT. That's what I've been told by the FE folks and that's
why the tree optimizers almost always rely on
is_gimple_min_invariant().
What does this have to do with the volatile question I'm asking about?
Make your FE set TREE_INVARIANT on "constant" ADDR_EXPRs and it will all
work fine in get_expr_operands.
To repeat what I said before, it's not the job of a front end to set
these flags on ADDR_EXPRs and they would be blown away by the middle-end
if it did. They are set by recompute_tree_invarant_for_addr_expr.