This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR 18746, fab causing more problems
On Dec 1, 2004, at 2:02 PM, Andrew MacLeod wrote:
On Wed, 2004-12-01 at 13:22, Diego Novillo wrote:
On Wed, Dec 01, 2004 at 09:37:55AM -0800, Richard Henderson wrote:
So, the call to mark_new_vars_to_rename actually prevents the
alias analyzer from tripping itself over incomplete alias info.
This is not the ideal solution, but is the least intrusive I can
think of. Ideally, we could probably have a flag for
get_stmt_operands to only do real operands. Or, the alias
analyzer could do a prior pass of refreshing statement operands
before it clears all the alias sets.
Do you mean call get_stmt_operands() on all stmts before clearing the
alias sets? Doesnt help for 4.0, but in 4.1 modify_stmt() should no
longer be updating this stuff lazily, so the operands will always be up
to date. Meaning you get the equivalent of a prior pass of refreshing
for free. It just might change how you view the solution for 4.0....
That is a better way of fixing it ...
In fact sine there are other passes which call modify_stmt which causes
the same problem, I propose the following patch which just goes through
before clearing the aliasing sets and gets the statement operands.
OK? Bootstrapping right now with disable-checking, it is passed stage2
(I turned off ENABLE_CHECKING with stage1).
-- Andrew Pinski
* tree-ssa-alias.c (compute_may_aliases): Get all statement operands
before doing anything so we don't get operands which are not renamed
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-alias.c,v
retrieving revision 2.60
diff -u -p -r2.60 tree-ssa-alias.c
--- tree-ssa-alias.c 1 Dec 2004 00:33:05 -0000 2.60
+++ tree-ssa-alias.c 1 Dec 2004 19:17:42 -0000
@@ -291,6 +291,18 @@ static void
struct alias_info *ai;
+ basic_block bb;
+ /* We cannot be lazy getting the statement operands as if we are
+ would get non SSA_NAMEs in the VOPs which would we balk at below.
+ FOR_EACH_BB (bb)
+ block_stmt_iterator si;
+ for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si))
+ get_stmt_operands (bsi_stmt (si));
memset (&alias_stats, 0, sizeof (alias_stats));