-/* Create the rtl to represent a function, for a function definition.
- DECL is a FUNCTION_DECL node which describes which function.
- The rtl is stored into DECL. */
-
-void
-make_function_rtl (decl)
- tree decl;
-{
- char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
- char *new_name = name;
-
- /* Rename a nested function to avoid conflicts. */
- if (decl_function_context (decl) != 0
- && DECL_INITIAL (decl) != 0
- && DECL_RTL (decl) == 0)
- {
- char *label;
-
- name = IDENTIFIER_POINTER (DECL_NAME (decl));
- ASM_FORMAT_PRIVATE_NAME (label, name, var_labelno);
- name = ggc_alloc_string (label, -1);
- var_labelno++;
- }
- else
- {
- /* When -fprefix-function-name is used, every function name is
- prefixed. Even static functions are prefixed because they
- could be declared latter. Note that a nested function name
- is not prefixed. */
- if (flag_prefix_function_name)
- {
- size_t name_len = strlen (name);
-
- new_name = ggc_alloc_string (NULL, name_len + CHKR_PREFIX_SIZE);
- memcpy (new_name, CHKR_PREFIX, CHKR_PREFIX_SIZE);
- memcpy (new_name + CHKR_PREFIX_SIZE, name, name_len + 1);
- name = new_name;
- }
- }
-
- if (DECL_RTL (decl) == 0)
- {
- DECL_RTL (decl)
- = gen_rtx_MEM (DECL_MODE (decl),
- gen_rtx_SYMBOL_REF (Pmode, name));
-
- /* Optionally set flags or add text to the name to record information
- such as that it is a function name. If the name is changed, the macro
- ASM_OUTPUT_LABELREF will have to know how to strip this information. */
-#ifdef ENCODE_SECTION_INFO
- ENCODE_SECTION_INFO (decl);
-#endif
- }
- else
- {
- /* ??? Another way to do this would be to do what halfpic.c does
- and maintain a hashed table of such critters. */
- /* ??? Another way to do this would be to pass a flag bit to
- ENCODE_SECTION_INFO saying whether this is a new decl or not. */
- /* Let the target reassign the RTL if it wants.
- This is necessary, for example, when one machine specific
- decl attribute overrides another. */
-#ifdef REDO_SECTION_INFO_P
- if (REDO_SECTION_INFO_P (decl))
- ENCODE_SECTION_INFO (decl);
-#endif
- }
-}
-