This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix bootstrap misscompare with -fmove-loop-invariants
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Feb 2006 11:45:02 +0100
- Subject: [patch] Fix bootstrap misscompare with -fmove-loop-invariants
Hello,
loop-invariant scans the register uses according to df up to
DF_REG_SIZE. However, DF_REG_SIZE returns the total size of regs
array, including not yet used and initialized elements. This patch
makes DF_REG_SIZE return the length of the initialized part of the
array. Bootstrapped & regtested on i686 and x86_64, commited as obvious
(Kenneth also agrees with the patch).
Zdenek
* df.h (DF_REG_SIZE): Return the length of the initialized
part of the array.
Index: df.h
===================================================================
*** df.h (revision 110655)
--- df.h (working copy)
*************** struct df
*** 395,401 ****
/* Macros to access the register information from scan dataflow record. */
! #define DF_REG_SIZE(DF) ((DF)->def_info.regs_size)
#define DF_REG_DEF_GET(DF, REG) ((DF)->def_info.regs[(REG)])
#define DF_REG_DEF_SET(DF, REG, VAL) ((DF)->def_info.regs[(REG)]=(VAL))
#define DF_REG_USE_GET(DF, REG) ((DF)->use_info.regs[(REG)])
--- 395,401 ----
/* Macros to access the register information from scan dataflow record. */
! #define DF_REG_SIZE(DF) ((DF)->def_info.regs_inited)
#define DF_REG_DEF_GET(DF, REG) ((DF)->def_info.regs[(REG)])
#define DF_REG_DEF_SET(DF, REG, VAL) ((DF)->def_info.regs[(REG)]=(VAL))
#define DF_REG_USE_GET(DF, REG) ((DF)->use_info.regs[(REG)])