[PATCH] Remove more remnants of deleted RTL passes

Paolo Bonzini bonzini@gnu.org
Tue Jun 15 09:58:00 GMT 2004


The first remnant is cfun->current_inline.  This field is only read by
the C++ front-end, not even by the middle-end.  Other front-ends only
write to it.  Objective-C does so while setting DECL_INLINE and
DECL_UNINLINABLE.  Java does not do anything else in
emit_register_classes, and disables flag_inline_functions around the
call to rest_of_compilation in write_resource_constructor (useless since
rest_of_compilation does not look at it!).

What happens in C++ is:
- start_objects or start_static_storage_duration_function set it
- it is copied to struct language_function in save_function_data, and at
the same time DECL_INLINE is reset to 0.
- it is restored in cxx_push_function_context.
- nobody then uses it.

So it is easier to reset DECL_INLINE (and since I was at it,  set
DECL_UNINLINABLE) right in start_objects and
start_static_storage_duration_function.  I fixed Java to do the same
where it used to set cfun->current_inline.

The second is that in rest_of_compilation, extra effort is done if
"-fsyntax-only -Wreturn-type" is active, but now that warning was moved
to the tree level, so this is useless.

The third is that rest_of_compilation now will definitely output the
function, so it is possible to reset DECL_DEFER_OUTPUT there, and
simplify a couple of conditionals based on that.

Bootstrapped/regtested i686-pc-linux-gnu, ok for mainline?

Paolo


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: remove-rtl-inliner-remnants.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040615/5581fa57/attachment.ksh>


More information about the Gcc-patches mailing list