This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/15242] pessimization of "goto *"
- From: "zlomek at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2004 13:34:22 -0000
- Subject: [Bug rtl-optimization/15242] pessimization of "goto *"
- References: <20040501142654.15242.anton@mips.complang.tuwien.ac.at>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From zlomek at gcc dot gnu dot org 2004-07-07 13:34 -------
> I tried this patch with gcc-3.5-20040523, and the problem was still
there
The optimization is enabled at -O2 (or -O -freorder-blocks).
If there is a uncond jump to a block containing a computed jump and the block is
small enough (several instructions) the block is copied to eliminate the uncond
jump.
When I was testing the patch with current mainline I have noticed that the
current_function_has_computed_jump flag is incorrectly unset in make_edges()
when compiling ef.i. IMHO the flag should not be set initialized to 0 (or 1 if
flag_reorder_blocks_and_partition) in make_edges() but somewhere earlier because
make_edges() can be called several times and only a subset of blocks may be
scanned for computed jumps in it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15242