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]

[dataflow obvious] DF_SUBREGS patch fallout


As reported by Kenny in private mail.  In some cases there are curious
discrepancies between ->reg and ->loc and this caused DF_REF_REAL_LOC to
not strip subregs -- fixed by using ->loc in DF_REF_REAL_LOC, but the
difference between ->reg and ->loc in REG_DEAD and REG_UNUSED code
should be documented...

Will commit after bootstrap/regtest on i686-pc-linux-gnu, but feel free
to beat me to it since I won't bootstrap/regtest on an affected machine.

Paolo

2006-10-26 Paolo Bonzini <bonzini@gnu.org>

        * df.h (DF_REF_REAL_LOC): Don't use (REF)->reg, use
	instead *((REF)->loc).

Index: df.h
===================================================================
--- df.h (revision 118000)
+++ df.h (working copy)
@@ -454,8 +454,8 @@ struct df
#define DF_REF_REAL_REG(REF) (GET_CODE ((REF)->reg) == SUBREG \
? SUBREG_REG ((REF)->reg) : ((REF)->reg))
#define DF_REF_REGNO(REF) ((REF)->regno)
-#define DF_REF_REAL_LOC(REF) (GET_CODE ((REF)->reg) == SUBREG \
- ? &SUBREG_REG ((REF)->reg) : ((REF)->loc))
+#define DF_REF_REAL_LOC(REF) (GET_CODE (*((REF)->loc)) == SUBREG \
+ ? &SUBREG_REG (*((REF)->loc)) : ((REF)->loc))
#define DF_REF_REG(REF) ((REF)->reg)
#define DF_REF_LOC(REF) ((REF)->loc)
#define DF_REF_BB(REF) ((REF)->bb)



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