This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[vta] ignore debug stmts in ipa-pure-const.c's check_stmt
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 May 2009 22:22:59 -0300
- Subject: [vta] ignore debug stmts in ipa-pure-const.c's check_stmt
I haven't checked that this actually fixes any failures, but I came
across it while looking for a fix for the problem I'm going to describe
in the next patch. At the very least, it should save us from some
unnecessary walking, but it might actually avoid codegen differences if
a debug stmt refers to a volatile memory location or somesuch.
I'm installing this in the VTA branch.
for gcc/ChangeLog.vta
from Alexandre Oliva <aoliva@redhat.com>
* ipa-pure-const.c (check_stmt): Ignore debug stmts.
Index: gcc/ipa-pure-const.c
===================================================================
--- gcc/ipa-pure-const.c.orig 2009-05-12 17:10:31.000000000 -0300
+++ gcc/ipa-pure-const.c 2009-05-15 17:03:25.000000000 -0300
@@ -1,5 +1,5 @@
/* Callgraph based analysis of static variables.
- Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
This file is part of GCC.
@@ -399,6 +399,9 @@ check_stmt (gimple_stmt_iterator *gsip,
gimple stmt = gsi_stmt (*gsip);
unsigned int i = 0;
+ if (IS_DEBUG_STMT (stmt))
+ return;
+
if (dump_file)
{
fprintf (dump_file, " scanning: ");
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer