This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix enum li_flags
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 4 Jan 2007 10:52:27 +0100
- Subject: [patch] Fix enum li_flags
Hello,
loop iterators use bitmask of flags to determine which loops to traverse
and in what order. However, the values of li_flags are not powers
of two, hence part of the code that uses the iterators does something
a bit different than what it claims just now. This patch fixes the
problem. Bootstrapped & regtested on i686 and x86_64, commited.
Zdenek
Index: ChangeLog
===================================================================
*** ChangeLog (revision 120432)
--- ChangeLog (working copy)
***************
*** 1,10 ****
2007-01-04 Jan Hubicka <jh@suse.cz>
* tree-inline.c (copy_bb): Insert new statements to statements_to_fold
set.
(fold_marked_statements): New function.
(optimize_inline_calls, tree_function_versioning): Fold new statements.
! * tree-inline.h (copy_body_data): Add statemetns_to_fold.
2007-01-03 Daniel Jacobowitz <dan@codesourcery.com>
--- 1,14 ----
+ 2007-01-04 Zdenek Dvorak <dvorakz@suse.cz>
+
+ * cfgloop.h (enum li_flags): Make the constants powers of two.
+
2007-01-04 Jan Hubicka <jh@suse.cz>
* tree-inline.c (copy_bb): Insert new statements to statements_to_fold
set.
(fold_marked_statements): New function.
(optimize_inline_calls, tree_function_versioning): Fold new statements.
! * tree-inline.h (copy_body_data): Add statements_to_fold.
2007-01-03 Daniel Jacobowitz <dan@codesourcery.com>
Index: cfgloop.h
===================================================================
*** cfgloop.h (revision 120432)
--- cfgloop.h (working copy)
*************** number_of_loops (void)
*** 406,416 ****
enum li_flags
{
! LI_INCLUDE_ROOT, /* Include the fake root of the loop tree. */
! LI_FROM_INNERMOST, /* Iterate over the loops in the reverse order,
starting from innermost ones. */
! LI_ONLY_INNERMOST, /* Iterate only over innermost loops. */
! LI_ONLY_OLD /* Do not traverse the loops created during the
traversal (this is the default behavior with
LI_FROM_INNERMOST). */
};
--- 406,416 ----
enum li_flags
{
! LI_INCLUDE_ROOT = 1, /* Include the fake root of the loop tree. */
! LI_FROM_INNERMOST = 2,/* Iterate over the loops in the reverse order,
starting from innermost ones. */
! LI_ONLY_INNERMOST = 4,/* Iterate only over innermost loops. */
! LI_ONLY_OLD = 8 /* Do not traverse the loops created during the
traversal (this is the default behavior with
LI_FROM_INNERMOST). */
};