* valgrind fix: Set not_replacable in loop.c
@ 2002-11-18 22:13 Andreas Jaeger
2002-11-19 15:46 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Jaeger @ 2002-11-18 22:13 UTC (permalink / raw)
To: gcc-patches
Bootstrapping GCC with valgrind shows these:
stage2/xgcc -Bstage2/ -B/opt/gcc/3.3-devel/i686-pc-linux-gnu/bin/ -c -DVALGRIND_PATH=\"/opt/valgrind/bin/valgrind\" -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -fno-common -DHAVE_CONFIG_H -I. -Ijava -I/cvs/gcc/gcc -I/cvs/gcc/gcc/java -I/cvs/gcc/gcc/config -I/cvs/gcc/gcc/../include /cvs/gcc/gcc/java/jvgenmain.c -o java/jvgenmain.o
==23127== Conditional jump or move depends on uninitialised value(s)
==23127== at 0x83DFF28: loop_givs_check (/cvs/gcc/gcc/loop.c:4599)
==23127== by 0x83E0D33: strength_reduce (/cvs/gcc/gcc/loop.c:5126)
==23127== by 0x83CDB9B: scan_loop (/cvs/gcc/gcc/loop.c:1173)
==23127== by 0x83CD4E3: loop_optimize (/cvs/gcc/gcc/loop.c:472)
The problem is that we do not set not_replacable in all cases.
I'm currently testing the appended patch. Ok to commit if
bootstrapping succeeds on i686-linux-gnu?
Andreas
2002-11-19 Andreas Jaeger <aj@suse.de>
* loop.c (record_giv): Initialize not_replaceable.
(check_final_value): Likewise.
============================================================
Index: gcc/loop.c
--- gcc/loop.c 4 Nov 2002 20:06:28 -0000 1.431
+++ gcc/loop.c 19 Nov 2002 05:54:40 -0000
@@ -5835,7 +5835,10 @@ record_giv (loop, v, insn, src_reg, dest
abort ();
if (type == DEST_ADDR)
- v->replaceable = 1;
+ {
+ v->replaceable = 1;
+ v->not_replaceable = 0;
+ }
else
{
/* The giv can be replaced outright by the reduced register only if all
@@ -5870,6 +5873,7 @@ record_giv (loop, v, insn, src_reg, dest
using this biv anyways. */
v->replaceable = 1;
+ v->not_replaceable = 0;
for (b = bl->biv; b; b = b->next_iv)
{
if (INSN_UID (b->insn) >= max_uid_for_loop
@@ -5981,6 +5985,7 @@ check_final_value (loop, v)
rtx last_giv_use;
v->replaceable = 1;
+ v->not_replaceable = 0;
/* When trying to determine whether or not a biv increment occurs
during the lifetime of the giv, we can ignore uses of the variable
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: valgrind fix: Set not_replacable in loop.c
2002-11-18 22:13 valgrind fix: Set not_replacable in loop.c Andreas Jaeger
@ 2002-11-19 15:46 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2002-11-19 15:46 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: gcc-patches
On Tue, Nov 19, 2002 at 07:13:21AM +0100, Andreas Jaeger wrote:
> * loop.c (record_giv): Initialize not_replaceable.
> (check_final_value): Likewise.
Ok.
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-19 23:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-18 22:13 valgrind fix: Set not_replacable in loop.c Andreas Jaeger
2002-11-19 15:46 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).