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: [PATCH] Merging BB and user labels (tree level)


Andrew Pinski wrote:

I don't know if this is unsuitable for 4.0, but it should help compile
time and also code generation but I have not tested it on SPEC because
I don't have access to it.

Well, we are feature frozen. Do you have any timings that would justify including this in 4.0? If we are already doing this at the RTL level (that's surprising, I thought we only merged blocks with user labels at -O3), I don't have any objections in doing this at the tree level.

This change would have to be verified with the gdb testsuite, as well.

@@ -1238,8 +1238,12 @@ tree_can_merge_blocks_p (basic_block a, phi nodes should be cleaned up by kill_redundant_phi_nodes. */
if (phi_nodes (b))
return false;
+ + /* If we are optimizing we can merge the basic blocks. */
+ if (optimize)
+ return true;
It's cleaner if you protect the for loop below with

if (optimize <= 1)

-  /* Do not remove user labels.  */
+  /* Do not move user labels if we are not optimizing.  */
   for (bsi = bsi_start (b); !bsi_end_p (bsi); bsi_next (&bsi))
     {
       stmt = bsi_stmt (bsi);

The rest of the patch looks OK to me and it seems innocent enough. Provided that it doesn't break any gdb tests and gives us enough good results, we could consider it for 4.0. Mark?



Diego.



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