Ping^2

Joern RENNECKE joern.rennecke@st.com
Tue Jan 4 13:17:00 GMT 2005


Kaz Kojima wrote:

>    
>
>+#if defined (MODE_ENTRY) && defined (MODE_EXIT)
>+/* Split the edge from the entry block and the fallthrough edge to the
>+   exit block, so that we can note that there NORMAL_MODE is supplied /
>+   required.  Return the new block if it's inserted before the exit
>+   block.  Otherwise return null.  */
>

That comment has to be split.  Where post_entry is set, you need:

/* Split the edge from the entry block, so that we can note that
   there NORMAL_MODE is supplied.  */

And for the new function:
/* Split the fallthrough edge to the exit block, so that we can note
   that there NORMAL_MODE is required.  Return the new block if it's
   inserted before the exit block.  Otherwise return null.  */

Otherwise, that patch is fine with me.

Alternatively, you could actually put all the functionality into one
function, but that would require passing one or two pointers, or
returning a struct.  You could then move the #ifdef for this function
inside, to guard just the part that sets post_entry / pre_exit to
something other than NULL, and replace all the ifdefs of the code
that use these variables with if clauses testing these variables
(for pre_exit, some are already there).  The run-time impact should
be neglegible, because this code is run only once or n_entities times
per function.  I'm not sure if our current optimization
infrastructure will be able to optimize this code away for the i386
target, so the i386 targeted compilers might become slightly larger -
I think something in the ballpark of 50 bytes.  On the plus side,
the code would become more maintainable, as all these spattered
#ifdefs increase the risk to make the code uncompilable for a few
targets by accident.






More information about the Gcc-patches mailing list