WITH_CLEANUP_EXPR oddity
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Mon Jun 21 11:22:00 GMT 2004
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.
More information about the Gcc
mailing list