Commit 1b329510 by David Edelsohn Committed by David Edelsohn

rs6000.c (rs6000_output_symbol_ref): Move storage mapping class decoration from here...

        * config/rs6000/rs6000.c (rs6000_output_symbol_ref): Move storage
        mapping class decoration from here...
        (rs6000_xcoff_encode_section): ...to here.

        (rs6000_savres_strategy) [AIX,ELFv2]: Inline FPR save and restore
        if shrink-wrapping and optimizing for speed.

From-SVN: r241303
parent e5163ec1
2016-10-18 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/rs6000.c (rs6000_output_symbol_ref): Move storage
mapping class decoration from here...
(rs6000_xcoff_encode_section): ...to here.
(rs6000_savres_strategy) [AIX,ELFv2]: Inline FPR save and restore
if shrink-wrapping and optimizing for speed.
2016-10-18 Richard Biener <rguenther@suse.de> 2016-10-18 Richard Biener <rguenther@suse.de>
* tree-vrp.c (evrp_dom_walker::before_dom_children): Handle * tree-vrp.c (evrp_dom_walker::before_dom_children): Handle
......
...@@ -25452,7 +25452,8 @@ rs6000_savres_strategy (rs6000_stack_t *info, ...@@ -25452,7 +25452,8 @@ rs6000_savres_strategy (rs6000_stack_t *info,
else else
{ {
gcc_checking_assert (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2); gcc_checking_assert (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2);
if (info->first_fp_reg_save > 61) if ((flag_shrink_wrap_separate && optimize_function_for_speed_p (cfun))
|| info->first_fp_reg_save > 61)
strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS;
strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS;
strategy |= SAVE_INLINE_VRS | REST_INLINE_VRS; strategy |= SAVE_INLINE_VRS | REST_INLINE_VRS;
...@@ -30680,31 +30681,14 @@ rs6000_xcoff_strip_dollar (const char *name) ...@@ -30680,31 +30681,14 @@ rs6000_xcoff_strip_dollar (const char *name)
void void
rs6000_output_symbol_ref (FILE *file, rtx x) rs6000_output_symbol_ref (FILE *file, rtx x)
{ {
const char *name = XSTR (x, 0);
/* Currently C++ toc references to vtables can be emitted before it /* Currently C++ toc references to vtables can be emitted before it
is decided whether the vtable is public or private. If this is is decided whether the vtable is public or private. If this is
the case, then the linker will eventually complain that there is the case, then the linker will eventually complain that there is
a reference to an unknown section. Thus, for vtables only, a reference to an unknown section. Thus, for vtables only,
we emit the TOC reference to reference the symbol and not the we emit the TOC reference to reference the identifier and not the
section. */ symbol. */
const char *name = XSTR (x, 0);
tree decl = SYMBOL_REF_DECL (x);
if (decl /* sync condition with assemble_external () */
&& DECL_P (decl) && DECL_EXTERNAL (decl) && TREE_PUBLIC (decl)
&& (TREE_CODE (decl) == VAR_DECL
|| TREE_CODE (decl) == FUNCTION_DECL)
&& name[strlen (name) - 1] != ']')
{
name = concat (name,
(TREE_CODE (decl) == FUNCTION_DECL
? "[DS]" : "[UA]"),
NULL);
/* Don't modify name in extern VAR_DECL to include mapping class. */
if (TREE_CODE (decl) == FUNCTION_DECL)
XSTR (x, 0) = name;
}
if (VTABLE_NAME_P (name)) if (VTABLE_NAME_P (name))
{ {
RS6000_OUTPUT_BASENAME (file, name); RS6000_OUTPUT_BASENAME (file, name);
...@@ -35277,6 +35261,7 @@ rs6000_xcoff_encode_section_info (tree decl, rtx rtl, int first) ...@@ -35277,6 +35261,7 @@ rs6000_xcoff_encode_section_info (tree decl, rtx rtl, int first)
{ {
rtx symbol; rtx symbol;
int flags; int flags;
const char *symname;
default_encode_section_info (decl, rtl, first); default_encode_section_info (decl, rtl, first);
...@@ -35293,6 +35278,21 @@ rs6000_xcoff_encode_section_info (tree decl, rtx rtl, int first) ...@@ -35293,6 +35278,21 @@ rs6000_xcoff_encode_section_info (tree decl, rtx rtl, int first)
flags &= ~SYMBOL_FLAG_HAS_BLOCK_INFO; flags &= ~SYMBOL_FLAG_HAS_BLOCK_INFO;
SYMBOL_REF_FLAGS (symbol) = flags; SYMBOL_REF_FLAGS (symbol) = flags;
/* Append mapping class to extern decls. */
symname = XSTR (symbol, 0);
if (decl /* sync condition with assemble_external () */
&& DECL_P (decl) && DECL_EXTERNAL (decl) && TREE_PUBLIC (decl)
&& ((TREE_CODE (decl) == VAR_DECL && !DECL_THREAD_LOCAL_P (decl))
|| TREE_CODE (decl) == FUNCTION_DECL)
&& symname[strlen (symname) - 1] != ']')
{
char *newname = (char *) alloca (strlen (symname) + 5);
strcpy (newname, symname);
strcat (newname, (TREE_CODE (decl) == FUNCTION_DECL
? "[DS]" : "[UA]"));
XSTR (symbol, 0) = ggc_strdup (newname);
}
} }
#endif /* HAVE_AS_TLS */ #endif /* HAVE_AS_TLS */
#endif /* TARGET_XCOFF */ #endif /* TARGET_XCOFF */
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