Commit 23626154 by Richard Henderson Committed by Richard Henderson

calls.c: Include target.h.

        * calls.c: Include target.h.
        * Makefile.in (calls.o): Update.

        * config/alpha/alpha.c (alpha_end_function): Use targetm.binds_local_p.
        * config/alpha/alpha.h (FUNCTION_OK_FOR_SIBCALL): Likewise.

From-SVN: r56335
parent fd350d24
2002-08-14 Richard Henderson <rth@redhat.com> 2002-08-14 Richard Henderson <rth@redhat.com>
* calls.c: Include target.h.
* Makefile.in (calls.o): Update.
* config/alpha/alpha.c (alpha_end_function): Use targetm.binds_local_p.
* config/alpha/alpha.h (FUNCTION_OK_FOR_SIBCALL): Likewise.
2002-08-14 Richard Henderson <rth@redhat.com>
* Makefile.in (LOOSE_WARN): Add -fno-common. * Makefile.in (LOOSE_WARN): Add -fno-common.
* c-common.h (constant_string_class_name): Add missing extern. * c-common.h (constant_string_class_name): Add missing extern.
......
...@@ -1440,7 +1440,7 @@ builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ ...@@ -1440,7 +1440,7 @@ builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
$(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \ $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
except.h $(TM_P_H) $(PREDICT_H) libfuncs.h real.h langhooks.h except.h $(TM_P_H) $(PREDICT_H) libfuncs.h real.h langhooks.h
calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
$(EXPR_H) langhooks.h \ $(EXPR_H) langhooks.h $(TARGET_H) \
libfuncs.h $(REGS_H) toplev.h output.h function.h $(TIMEVAR_H) $(TM_P_H) libfuncs.h $(REGS_H) toplev.h output.h function.h $(TIMEVAR_H) $(TM_P_H)
expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \ expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) real.h \ insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) real.h \
......
...@@ -34,6 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -34,6 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "timevar.h" #include "timevar.h"
#include "sbitmap.h" #include "sbitmap.h"
#include "langhooks.h" #include "langhooks.h"
#include "target.h"
#if !defined FUNCTION_OK_FOR_SIBCALL #if !defined FUNCTION_OK_FOR_SIBCALL
#define FUNCTION_OK_FOR_SIBCALL(DECL) 1 #define FUNCTION_OK_FOR_SIBCALL(DECL) 1
......
...@@ -7736,7 +7736,7 @@ void ...@@ -7736,7 +7736,7 @@ void
alpha_end_function (file, fnname, decl) alpha_end_function (file, fnname, decl)
FILE *file; FILE *file;
const char *fnname; const char *fnname;
tree decl ATTRIBUTE_UNUSED; tree decl;
{ {
/* End the function. */ /* End the function. */
if (!TARGET_ABI_UNICOSMK && !flag_inhibit_size_directive) if (!TARGET_ABI_UNICOSMK && !flag_inhibit_size_directive)
...@@ -7749,18 +7749,14 @@ alpha_end_function (file, fnname, decl) ...@@ -7749,18 +7749,14 @@ alpha_end_function (file, fnname, decl)
/* Show that we know this function if it is called again. /* Show that we know this function if it is called again.
Don't do this for global functions in object files destined for a Do this only for functions whose symbols bind locally.
shared library because the function may be overridden by the application
or other libraries. Similarly, don't do this for weak functions.
Don't do this for functions not defined in the .text section, as Don't do this for functions not defined in the .text section, as
otherwise it's not unlikely that the destination is out of range otherwise it's not unlikely that the destination is out of range
for a direct branch. */ for a direct branch. */
if (!DECL_WEAK (current_function_decl) if ((*targetm.binds_local_p) (decl) && decl_in_text_section (decl))
&& (!flag_pic || !TREE_PUBLIC (current_function_decl)) SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
&& decl_in_text_section (current_function_decl))
SYMBOL_REF_FLAG (XEXP (DECL_RTL (current_function_decl), 0)) = 1;
/* Output jump tables and the static subroutine information block. */ /* Output jump tables and the static subroutine information block. */
if (TARGET_ABI_UNICOSMK) if (TARGET_ABI_UNICOSMK)
......
...@@ -1158,12 +1158,11 @@ extern int alpha_memory_latency; ...@@ -1158,12 +1158,11 @@ extern int alpha_memory_latency;
/* We do not allow indirect calls to be optimized into sibling calls, nor /* We do not allow indirect calls to be optimized into sibling calls, nor
can we allow a call to a function in a different compilation unit to can we allow a call to a function in a different compilation unit to
be optimized into a sibcall. Except if the function is known not to be optimized into a sibcall. */
return, in which case our caller doesn't care what the gp is. */
#define FUNCTION_OK_FOR_SIBCALL(DECL) \ #define FUNCTION_OK_FOR_SIBCALL(DECL) \
(DECL \ (DECL \
&& ((TREE_ASM_WRITTEN (DECL) && !flag_pic) \ && (! TREE_PUBLIC (DECL) \
|| ! TREE_PUBLIC (DECL))) || (TREE_ASM_WRITTEN (DECL) && (*targetm.binds_local_p) (DECL))))
/* Try to output insns to set TARGET equal to the constant C if it can be /* Try to output insns to set TARGET equal to the constant C if it can be
done in less than N insns. Do all computations in MODE. Returns the place done in less than N insns. Do all computations in MODE. Returns the place
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment