public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Minor tweak to df_note_bb_compute
@ 2016-06-09 21:51 Eric Botcazou
  2016-06-29 15:31 ` Eric Botcazou
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Botcazou @ 2016-06-09 21:51 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

This simply prevents valgrind from complaining about an invalid read when 
pass_free_cfg::execute calls df_analyze for targets with delay slots, because 
var_location instructions are present in the RTL stream at this point.

Tested on x86_64-suse-linux, applied on the mainline as obvious.


2016-06-09  Eric Botcazou  <ebotcazou@adacore.com>

	* df-problems.c (df_note_bb_compute): Guard use of DF_INSN_INFO_GET.

-- 
Eric Botcazou

[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 535 bytes --]

Index: df-problems.c
===================================================================
--- df-problems.c	(revision 237165)
+++ df-problems.c	(working copy)
@@ -3498,13 +3498,13 @@ df_note_bb_compute (unsigned int bb_inde
 
   FOR_BB_INSNS_REVERSE (bb, insn)
     {
+      if (!INSN_P (insn))
+	continue;
+
       df_insn_info *insn_info = DF_INSN_INFO_GET (insn);
       df_mw_hardreg *mw;
       int debug_insn;
 
-      if (!INSN_P (insn))
-	continue;
-
       debug_insn = DEBUG_INSN_P (insn);
 
       bitmap_clear (do_not_gen);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Minor tweak to df_note_bb_compute
  2016-06-09 21:51 Minor tweak to df_note_bb_compute Eric Botcazou
@ 2016-06-29 15:31 ` Eric Botcazou
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Botcazou @ 2016-06-29 15:31 UTC (permalink / raw)
  To: gcc-patches

> This simply prevents valgrind from complaining about an invalid read when
> pass_free_cfg::execute calls df_analyze for targets with delay slots,
> because var_location instructions are present in the RTL stream at this
> point.
> 
> Tested on x86_64-suse-linux, applied on the mainline as obvious.
> 
> 
> 2016-06-09  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* df-problems.c (df_note_bb_compute): Guard use of DF_INSN_INFO_GET.

I have backported it onto the 6 branch because we got segfaults for a cross-
compiler hosted on Windows triggered by the invalid read.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-29 15:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09 21:51 Minor tweak to df_note_bb_compute Eric Botcazou
2016-06-29 15:31 ` Eric Botcazou

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).