summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-13 16:23:02 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-13 16:23:02 +0000
commit91b9ca14b495fffaa922bac3eeef90dfa78aa41a (patch)
tree79d7aaa209003c98bf084900f1edde07ad8b22a0
parentce9de670c75486827611050c9189451557465257 (diff)
downloadgcc-91b9ca14b495fffaa922bac3eeef90dfa78aa41a.tar.gz
* varasm.c (notice_rtl_inlining_of_deferred_constant): New function.
* rtl.h: Prototype it. * integrate.c (copy_rtx_and_substitute <SYMBOL_REF>): Call it when appropriate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66762 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/integrate.c2
-rw-r--r--gcc/rtl.h3
-rw-r--r--gcc/varasm.c9
4 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c9c1cdf9de6..f3059a2298a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2003-05-13 Zack Weinberg <zack@codesourcery.com>
+
+ * varasm.c (notice_rtl_inlining_of_deferred_constant): New function.
+ * rtl.h: Prototype it.
+ * integrate.c (copy_rtx_and_substitute <SYMBOL_REF>): Call it
+ when appropriate.
+
2003-05-13 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.md ("*iordi3_oi"): Do not mark commutative.
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 0fd108f2b1d..c150dcbd709 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -2215,6 +2215,8 @@ copy_rtx_and_substitute (orig, map, for_lhs)
copy_rtx_and_substitute (constant, map, for_lhs)),
0);
}
+ else if (DEFERRED_CONSTANT_P (orig) && inlining)
+ notice_rtl_inlining_of_deferred_constant ();
return orig;
diff --git a/gcc/rtl.h b/gcc/rtl.h
index eab41e2918e..431b0dd4daf 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1945,6 +1945,9 @@ extern rtx find_next_ref PARAMS ((rtx, rtx));
extern rtx output_constant_def PARAMS ((tree, int));
+/* Called from integrate.c when a deferred constant is inlined. */
+extern void notice_rtl_inlining_of_deferred_constant PARAMS ((void));
+
/* Define a default value for STORE_FLAG_VALUE. */
#ifndef STORE_FLAG_VALUE
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 97125f1c663..811aa388d03 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2672,6 +2672,15 @@ output_constant_def_contents (symbol)
align);
}
+
+/* A constant which was deferred in its original location has been
+ inserted by the RTL inliner into a different function. The
+ current function's deferred constant count must be incremented. */
+void
+notice_rtl_inlining_of_deferred_constant ()
+{
+ n_deferred_constants++;
+}
/* Used in the hash tables to avoid outputting the same constant
twice. Unlike 'struct constant_descriptor_tree', RTX constants