-/* 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;
-{
- const char *name;
- const char *new_name;
-
- if (DECL_RTL (decl) != 0)
- {
- /* ??? 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
- return;
- }
-
- name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
- new_name = name;
-
- /* Rename a nested function to avoid conflicts, unless it's a member of
- a local class, in which case the class name is already unique. */
- if (decl_function_context (decl) != 0
- && ! TYPE_P (DECL_CONTEXT (decl))
- && DECL_INITIAL (decl) != 0
- && DECL_RTL (decl) == 0)
- {
- char *label;
- ASM_FORMAT_PRIVATE_NAME (label, name, var_labelno);
- var_labelno++;
- new_name = label;
- }
- /* 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. */
- else if (flag_prefix_function_name)
- {
- size_t name_len = IDENTIFIER_LENGTH (DECL_ASSEMBLER_NAME (decl));
- char *pname;
-
- pname = alloca (name_len + CHKR_PREFIX_SIZE + 1);
- memcpy (pname, CHKR_PREFIX, CHKR_PREFIX_SIZE);
- memcpy (pname + CHKR_PREFIX_SIZE, name, name_len + 1);
- new_name = pname;
- }
-
- if (name != new_name)
- {
- DECL_ASSEMBLER_NAME (decl) = get_identifier (new_name);
- name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
- }
-
- 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
-}
-
-