This is the mail archive of the gcc@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: WITH_CLEANUP_EXPR oddity


    I looked into fixing this once, but instead found so much redundant
    scanning being done as to be criminal.  Which lead me to rearrange
    how the gimplifier was structured, and afterward the problem naturally
    went away.

    I actually kinda prefer this solution, as it punishes sloppiness.

Well, if we're going to go in that direction, how about going all the way
and adding a flag saying that a node has been gimplified and ICE if we
try again?

    In what context are you finding yourself re-gimplifying?

It was with DECL_STMT in g++.  It was calling gimplify_stmt on
most statements and adding them to the statement list.  But because it didn't
do that for one statement, it returned GS_OK.  So the whole list got
gimplified again.  I changed it to gimplify all the statements it emits and
then return GS_ALL_DONE.

It looks like this was partially still using COMPOUND_EXPR, but I changed
it to use statement lists for consistency.


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