This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Merging BB and user labels (tree level)
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Mark Mitchell <mark at codesourcery dot com>
- Date: Fri, 17 Dec 2004 12:48:23 -0500
- Subject: Re: [PATCH] Merging BB and user labels (tree level)
- Organization: Red Hat Canada
- References: <90FAEF38-4FE6-11D9-A750-000A95D692F4@physics.uc.edu>
Andrew Pinski wrote:
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.
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.
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. */It's cleaner if you protect the for loop below with
if (phi_nodes (b))
+ /* If we are optimizing we can merge the basic blocks. */
+ if (optimize)
+ return true;
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?