[java/rfc] don't call make_decl_rtl from the front end
Andrew Haley
aph@redhat.com
Tue May 24 21:14:00 GMT 2005
Richard Henderson writes:
> This is patch 2 of 3 trying to fix the CNT plt problem. The main
> goal here is to avoid creating rtl too early, and indirectly forcing
> DECL_ASSEMBLER_NAME to be set too early. I very much want that to
> be done after java_mark_class_local, which happens after all parsing.
>
> A secondary cleanliness goal says that a front end shouldn't have to
> concern itself with such low-level details as rtl.
Yes, indeed.
> One thing for review is what build_class_ref played with DECL_SIZE?
> It would seem that would have been done by layout_decl, which is
> called by build_decl when presented with a complete type.
Right. the more of this front-end messing with back-end details we
lose, the better.
I'm sure there was a good reason for all this once upon a time, but if
it's no longer necessary that's fine.
> * 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.
>
Thanks,
Andrew.
More information about the Java-patches
mailing list