This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[vta, vta4.3] VAR_LOCATION has no side effects


At some point, while preparing an upcoming patch, I accidentally ended
up with clobbers with modes (other than VOIDmode) in debug
annotations, and this caused such insns to be marked as having side
effects, which was unexpected and IIRC caused differences in codegen.

The need for this change was obviated by using clobbers with VOIDmode
and by other changes that avoid scanning debug insns for side effects,
but I thought I'd check this in anyway.

for  gcc/ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* rtlanal.c (side_effects_p): Not in VAR_LOCATION.

Index: gcc/rtlanal.c
===================================================================
--- gcc/rtlanal.c.orig	2008-02-19 03:28:57.000000000 -0300
+++ gcc/rtlanal.c	2008-08-06 03:47:27.000000000 -0300
@@ -1,6 +1,6 @@
 /* Analyze RTL for GNU compiler.
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
    Foundation, Inc.
 
 This file is part of GCC.
@@ -2116,6 +2116,7 @@ side_effects_p (const_rtx x)
     case SCRATCH:
     case ADDR_VEC:
     case ADDR_DIFF_VEC:
+    case VAR_LOCATION:
       return 0;
 
     case CLOBBER:
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member       ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]