From: Jakub Jelinek <[email protected]>
Date: Mon, 31 Oct 2011 11:26:40 +0100
> Or alternatively you could remove the whole if (! !next_note ...)
> next_note = NULL_RTX; stmt and move your cache to a global var and
> clear it when reaching end of function (like
> e.g. last_var_location_insn is cleared in dwarf2out_end_epilogue).
This solution sounds the best, thanks Jakub!
If I get some time I'll see if I can more strongly integrate my changes
with the existing last_label sharing code there, as all of these tests
are checking for essentially the same thing.
--------------------
Invalidate cached next real insn in dwarf2out_end_epilogue().
* dwarf2out.c (cached_next_real_insn): New.
(dwarf2out_end_epilogue): Set it to NULL_RTX.
(dwarf2out_var_location): Remove cached_next_real_insn local static.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180713
138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 6 ++++++
gcc/dwarf2out.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index caed12e..4848147 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-31 David S. Miller <[email protected]>
+
+ * dwarf2out.c (cached_next_real_insn): New.
+ (dwarf2out_end_epilogue): Set it to NULL_RTX.
+ (dwarf2out_var_location): Remove cached_next_real_insn local static.
+
2011-10-31 Richard Henderson <[email protected]>
* config/i386/sse.md (floatv8siv8sf2): Rename from avx_cvtdq2ps256.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 478952f..e6f86a4 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -98,6 +98,7 @@ along with GCC; see the file COPYING3. If not see
static void dwarf2out_source_line (unsigned int, const char *, int, bool);
static rtx last_var_location_insn;
+static rtx cached_next_real_insn;
#ifdef VMS_DEBUGGING_INFO
int vms_file_stats_name (const char *, long long *, long *, char *, int *);
@@ -1090,6 +1091,7 @@ dwarf2out_end_epilogue (unsigned int line
ATTRIBUTE_UNUSED,
char label[MAX_ARTIFICIAL_LABEL_BYTES];
last_var_location_insn = NULL_RTX;
+ cached_next_real_insn = NULL_RTX;
if (dwarf2out_do_cfi_asm ())
fprintf (asm_out_file, "\t.cfi_endproc\n");
@@ -20132,7 +20134,6 @@ dwarf2out_var_location (rtx loc_note)
static const char *last_postcall_label;
static bool last_in_cold_section_p;
static rtx expected_next_loc_note;
- static rtx cached_next_real_insn;
tree decl;
bool var_loc_p;
--
1.7.6.401.g6a319