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: 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.


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