aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-05-24 12:22:03 -0700
committerRichard Henderson <rth@gcc.gnu.org>2005-05-24 12:22:03 -0700
commite0f391dd9030fce35ef9bb3592c1115f56c5a615 (patch)
tree4a60193fab42a6c6d1b45415aecfc9c782a4737b /gcc
parent8cfb12bfd597944d043b187199d23b3fc8381612 (diff)
downloadgcc-e0f391dd9030fce35ef9bb3592c1115f56c5a615.zip
gcc-e0f391dd9030fce35ef9bb3592c1115f56c5a615.tar.gz
gcc-e0f391dd9030fce35ef9bb3592c1115f56c5a615.tar.bz2
builtins.c (define_builtin): Don't call make_decl_rtl.
* builtins.c (define_builtin): Don't call make_decl_rtl. * constants.c (build_constant_data_ref): Likewise. * class.c (build_utf8_ref): Likewise. (build_fieldref_cache_entry, build_static_field_ref): Likewise. (get_dispatch_table, layout_class_method): Likewise. (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT by hand. (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME. (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P to determine if we need a non-zero address. * decl.c (builtin_function): Don't call make_decl_rtl. (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME. * expr.c (build_known_method_ref): Don't call make_decl_rtl. * resource.c (compile_resource_data): Likewise. * parse.y (resolve_field_access): Re-word comment to avoid building DECL_RTL. From-SVN: r100108
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog19
-rw-r--r--gcc/java/builtins.c1
-rw-r--r--gcc/java/class.c32
-rw-r--r--gcc/java/constants.c1
-rw-r--r--gcc/java/decl.c8
-rw-r--r--gcc/java/expr.c1
-rw-r--r--gcc/java/parse.y6
-rw-r--r--gcc/java/resource.c1
8 files changed, 31 insertions, 38 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index d713dcf..8617681 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,5 +1,24 @@
2005-05-24 Richard Henderson <rth@redhat.com>
+ * builtins.c (define_builtin): Don't call make_decl_rtl.
+ * constants.c (build_constant_data_ref): Likewise.
+ * class.c (build_utf8_ref): Likewise.
+ (build_fieldref_cache_entry, build_static_field_ref): Likewise.
+ (get_dispatch_table, layout_class_method): Likewise.
+ (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
+ by hand.
+ (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
+ (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
+ to determine if we need a non-zero address.
+ * decl.c (builtin_function): Don't call make_decl_rtl.
+ (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
+ * expr.c (build_known_method_ref): Don't call make_decl_rtl.
+ * resource.c (compile_resource_data): Likewise.
+ * parse.y (resolve_field_access): Re-word comment to avoid
+ building DECL_RTL.
+
+2005-05-24 Richard Henderson <rth@redhat.com>
+
* class.c (registered_class): Take it out of class_roots; turn into
a vec of trees.
(register_class): Make static. Don't duplicate decl node. Use
diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c
index dcfff1c..63cbfac 100644
--- a/gcc/java/builtins.c
+++ b/gcc/java/builtins.c
@@ -144,7 +144,6 @@ define_builtin (enum built_in_function val,
DECL_EXTERNAL (decl) = 1;
TREE_PUBLIC (decl) = 1;
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (libname));
- make_decl_rtl (decl);
pushdecl (decl);
DECL_BUILT_IN_CLASS (decl) = BUILT_IN_NORMAL;
DECL_FUNCTION_CODE (decl) = val;
diff --git a/gcc/java/class.c b/gcc/java/class.c
index 3c8a2e4..5616351 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -916,7 +916,6 @@ build_utf8_ref (tree name)
rest_of_decl_compilation (decl, global_bindings_p (), 0);
cgraph_varpool_mark_needed_node (cgraph_varpool_node (decl));
utf8_decl_list = decl;
- make_decl_rtl (decl);
ref = build1 (ADDR_EXPR, utf8const_ptr_type, decl);
IDENTIFIER_UTF8_REF (name) = ref;
return ref;
@@ -948,9 +947,9 @@ build_class_ref (tree type)
if (TREE_CODE (type) == POINTER_TYPE)
type = TREE_TYPE (type);
- if (flag_indirect_dispatch
- && type != output_class
- && TREE_CODE (type) == RECORD_TYPE)
+ if (flag_indirect_dispatch
+ && type != output_class
+ && TREE_CODE (type) == RECORD_TYPE)
return build_indirect_class_ref (type);
if (TREE_CODE (type) == RECORD_TYPE)
@@ -963,8 +962,6 @@ build_class_ref (tree type)
if (decl == NULL_TREE)
{
decl = build_decl (VAR_DECL, decl_name, class_type_node);
- DECL_SIZE (decl) = TYPE_SIZE (class_type_node);
- DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (class_type_node);
TREE_STATIC (decl) = 1;
TREE_PUBLIC (decl) = 1;
DECL_IGNORED_P (decl) = 1;
@@ -974,7 +971,6 @@ build_class_ref (tree type)
SET_DECL_ASSEMBLER_NAME (decl,
java_mangle_class_field
(&temporary_obstack, type));
- make_decl_rtl (decl);
pushdecl_top_level (decl);
}
}
@@ -1027,7 +1023,6 @@ build_class_ref (tree type)
TREE_PUBLIC (decl) = 1;
DECL_EXTERNAL (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
- make_decl_rtl (decl);
pushdecl_top_level (decl);
}
}
@@ -1058,7 +1053,6 @@ build_fieldref_cache_entry (int index, tree fdecl ATTRIBUTE_UNUSED)
TREE_PUBLIC (decl) = 0;
DECL_EXTERNAL (decl) = 0;
DECL_ARTIFICIAL (decl) = 1;
- make_decl_rtl (decl);
pushdecl_top_level (decl);
}
return decl;
@@ -1083,12 +1077,8 @@ build_static_field_ref (tree fdecl)
|| JNUMERIC_TYPE_P (TREE_TYPE (fdecl)))
&& TREE_CONSTANT (DECL_INITIAL (fdecl))))
{
- if (!DECL_RTL_SET_P (fdecl))
- {
- if (is_compiled == 1)
- DECL_EXTERNAL (fdecl) = 1;
- make_decl_rtl (fdecl);
- }
+ if (is_compiled == 1)
+ DECL_EXTERNAL (fdecl) = 1;
}
else
{
@@ -1240,7 +1230,6 @@ make_local_function_alias (tree method)
DECL_INITIAL (alias) = error_mark_node;
TREE_ADDRESSABLE (alias) = 1;
TREE_USED (alias) = 1;
- SET_DECL_ASSEMBLER_NAME (alias, DECL_NAME (alias));
TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias)) = 1;
if (!flag_syntax_only)
assemble_alias (alias, DECL_ASSEMBLER_NAME (method));
@@ -1320,7 +1309,7 @@ make_method_value (tree mdecl)
index = integer_minus_one_node;
code = null_pointer_node;
- if (DECL_RTL_SET_P (mdecl))
+ if (!METHOD_ABSTRACT (mdecl))
code = build1 (ADDR_EXPR, nativecode_ptr_type_node,
make_local_function_alias (mdecl));
START_RECORD_CONSTRUCTOR (minit, method_type_node);
@@ -1442,9 +1431,6 @@ get_dispatch_table (tree type, tree this_class_addr)
}
else
{
- if (!DECL_RTL_SET_P (method))
- make_decl_rtl (method);
-
if (TARGET_VTABLE_USES_DESCRIPTORS)
for (j = 0; j < TARGET_VTABLE_USES_DESCRIPTORS; ++j)
{
@@ -2335,12 +2321,6 @@ layout_class_method (tree this_class, tree super_class,
SET_DECL_ASSEMBLER_NAME (method_decl,
java_mangle_decl (&temporary_obstack,
method_decl));
- /* We don't generate a RTL for the method if it's abstract, or if
- it's an interface method that isn't clinit. */
- if (! METHOD_ABSTRACT (method_decl)
- || (CLASS_INTERFACE (TYPE_NAME (this_class))
- && (DECL_CLINIT_P (method_decl))))
- make_decl_rtl (method_decl);
if (ID_INIT_P (method_name))
{
diff --git a/gcc/java/constants.c b/gcc/java/constants.c
index 99e156f..196da58 100644
--- a/gcc/java/constants.c
+++ b/gcc/java/constants.c
@@ -446,7 +446,6 @@ build_constant_data_ref (void)
decl = build_decl (VAR_DECL, decl_name, type);
TREE_STATIC (decl) = 1;
- make_decl_rtl (decl);
TYPE_CPOOL_DATA_REF (output_class) = decl;
}
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index a74e518..5b693cb 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -558,7 +558,6 @@ builtin_function (const char *name,
TREE_PUBLIC (decl) = 1;
if (library_name)
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name));
- make_decl_rtl (decl);
pushdecl (decl);
DECL_BUILT_IN_CLASS (decl) = cl;
DECL_FUNCTION_CODE (decl) = function_code;
@@ -1854,7 +1853,6 @@ give_name_to_locals (JCF *jcf)
{
tree decl = TREE_VEC_ELT (decl_map, slot);
DECL_NAME (decl) = name;
- SET_DECL_ASSEMBLER_NAME (decl, name);
if (TREE_CODE (decl) != PARM_DECL || TREE_TYPE (decl) != type)
warning (0, "bad type in parameter debug info");
}
@@ -1921,7 +1919,6 @@ give_name_to_locals (JCF *jcf)
sprintf (buffer, "ARG_%d", arg_i);
DECL_NAME (parm) = get_identifier (buffer);
}
- SET_DECL_ASSEMBLER_NAME (parm, DECL_NAME (parm));
}
}
}
@@ -2127,6 +2124,11 @@ java_mark_decl_local (tree decl)
/* If we've already constructed DECL_RTL, give encode_section_info
a second chance, now that we've changed the flags. */
+ /* ??? Ideally, we'd have flag_unit_at_a_time set, and not have done
+ anything that would have referenced DECL_RTL so far. But at the
+ moment we force flag_unit_at_a_time off due to excessive memory
+ consumption when compiling large jar files. Which probably means
+ that we need to re-order how we process jar files... */
if (DECL_RTL_SET_P (decl))
make_decl_rtl (decl);
}
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 3a4002b..b488471 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -2050,7 +2050,6 @@ build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED,
if (! flag_indirect_dispatch
|| (! DECL_EXTERNAL (method) && ! TREE_PUBLIC (method)))
{
- make_decl_rtl (method);
func = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (method)),
method);
}
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index e90fc42..388062e 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -9550,11 +9550,7 @@ resolve_field_access (tree qual_wfl, tree *field_decl, tree *field_type)
field_ref = length;
/* In case we're dealing with a static array, we need to
- initialize its class before the array length can be fetched.
- It's also a good time to create a DECL_RTL for the field if
- none already exists, otherwise if the field was declared in a
- class found in an external file and hasn't been (and won't
- be) accessed for its value, none will be created. */
+ initialize its class before the array length can be fetched. */
if (TREE_CODE (where_found) == VAR_DECL && FIELD_STATIC (where_found))
{
build_static_field_ref (where_found);
diff --git a/gcc/java/resource.c b/gcc/java/resource.c
index c8fe0fb..2a0b690 100644
--- a/gcc/java/resource.c
+++ b/gcc/java/resource.c
@@ -93,7 +93,6 @@ compile_resource_data (const char *name, const char *buffer, int length)
layout_decl (decl, 0);
pushdecl (decl);
rest_of_decl_compilation (decl, global_bindings_p (), 0);
- make_decl_rtl (decl);
cgraph_varpool_finalize_decl (decl);
resources = tree_cons (NULL_TREE, decl, resources);