jit: document union types
[official-gcc.git] / gcc / cp / optimize.c
blob89750c0964c738d60701923fd14780a1d8dd44d5
1 /* Perform optimizations on tree structure.
2 Copyright (C) 1998-2015 Free Software Foundation, Inc.
3 Written by Mark Michell (mark@codesourcery.com).
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
12 GCC is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #include "config.h"
22 #include "system.h"
23 #include "coretypes.h"
24 #include "tm.h"
25 #include "alias.h"
26 #include "symtab.h"
27 #include "tree.h"
28 #include "stringpool.h"
29 #include "cp-tree.h"
30 #include "params.h"
31 #include "target.h"
32 #include "debug.h"
33 #include "tree-inline.h"
34 #include "flags.h"
35 #include "langhooks.h"
36 #include "diagnostic-core.h"
37 #include "dumpfile.h"
38 #include "tree-iterator.h"
39 #include "hard-reg-set.h"
40 #include "function.h"
41 #include "cgraph.h"
43 /* Prototypes. */
45 static void update_cloned_parm (tree, tree, bool);
47 /* CLONED_PARM is a copy of CLONE, generated for a cloned constructor
48 or destructor. Update it to ensure that the source-position for
49 the cloned parameter matches that for the original, and that the
50 debugging generation code will be able to find the original PARM. */
52 static void
53 update_cloned_parm (tree parm, tree cloned_parm, bool first)
55 DECL_ABSTRACT_ORIGIN (cloned_parm) = parm;
57 /* We may have taken its address. */
58 TREE_ADDRESSABLE (cloned_parm) = TREE_ADDRESSABLE (parm);
60 /* The definition might have different constness. */
61 TREE_READONLY (cloned_parm) = TREE_READONLY (parm);
63 TREE_USED (cloned_parm) = !first || TREE_USED (parm);
65 /* The name may have changed from the declaration. */
66 DECL_NAME (cloned_parm) = DECL_NAME (parm);
67 DECL_SOURCE_LOCATION (cloned_parm) = DECL_SOURCE_LOCATION (parm);
68 TREE_TYPE (cloned_parm) = TREE_TYPE (parm);
70 DECL_GIMPLE_REG_P (cloned_parm) = DECL_GIMPLE_REG_P (parm);
74 /* FN is a function in High GIMPLE form that has a complete body and no
75 CFG. CLONE is a function whose body is to be set to a copy of FN,
76 mapping argument declarations according to the ARG_MAP splay_tree. */
78 static void
79 clone_body (tree clone, tree fn, void *arg_map)
81 copy_body_data id;
82 tree stmts;
84 /* Clone the body, as if we were making an inline call. But, remap
85 the parameters in the callee to the parameters of caller. */
86 memset (&id, 0, sizeof (id));
87 id.src_fn = fn;
88 id.dst_fn = clone;
89 id.src_cfun = DECL_STRUCT_FUNCTION (fn);
90 id.decl_map = static_cast<hash_map<tree, tree> *> (arg_map);
92 id.copy_decl = copy_decl_no_change;
93 id.transform_call_graph_edges = CB_CGE_DUPLICATE;
94 id.transform_new_cfg = true;
95 id.transform_return_to_modify = false;
96 id.transform_lang_insert_block = NULL;
98 /* We're not inside any EH region. */
99 id.eh_lp_nr = 0;
101 stmts = DECL_SAVED_TREE (fn);
102 walk_tree (&stmts, copy_tree_body_r, &id, NULL);
104 /* Also remap the initializer of any static variables so that they (in
105 particular, any label addresses) correspond to the base variant rather
106 than the abstract one. */
107 if (DECL_NAME (clone) == base_dtor_identifier
108 || DECL_NAME (clone) == base_ctor_identifier)
110 unsigned ix;
111 tree decl;
113 FOR_EACH_LOCAL_DECL (DECL_STRUCT_FUNCTION (fn), ix, decl)
114 walk_tree (&DECL_INITIAL (decl), copy_tree_body_r, &id, NULL);
117 append_to_statement_list_force (stmts, &DECL_SAVED_TREE (clone));
120 /* DELETE_DTOR is a delete destructor whose body will be built.
121 COMPLETE_DTOR is the corresponding complete destructor. */
123 static void
124 build_delete_destructor_body (tree delete_dtor, tree complete_dtor)
126 tree call_dtor, call_delete;
127 tree parm = DECL_ARGUMENTS (delete_dtor);
128 tree virtual_size = cxx_sizeof (current_class_type);
130 /* Call the corresponding complete destructor. */
131 gcc_assert (complete_dtor);
132 call_dtor = build_cxx_call (complete_dtor, 1, &parm,
133 tf_warning_or_error);
134 add_stmt (call_dtor);
136 add_stmt (build_stmt (0, LABEL_EXPR, cdtor_label));
138 /* Call the delete function. */
139 call_delete = build_op_delete_call (DELETE_EXPR, current_class_ptr,
140 virtual_size,
141 /*global_p=*/false,
142 /*placement=*/NULL_TREE,
143 /*alloc_fn=*/NULL_TREE,
144 tf_warning_or_error);
145 add_stmt (call_delete);
147 /* Return the address of the object. */
148 if (targetm.cxx.cdtor_returns_this ())
150 tree val = DECL_ARGUMENTS (delete_dtor);
151 val = build2 (MODIFY_EXPR, TREE_TYPE (val),
152 DECL_RESULT (delete_dtor), val);
153 add_stmt (build_stmt (0, RETURN_EXPR, val));
157 /* Return name of comdat group for complete and base ctor (or dtor)
158 that have the same body. If dtor is virtual, deleting dtor goes
159 into this comdat group as well. */
161 static tree
162 cdtor_comdat_group (tree complete, tree base)
164 tree complete_name = DECL_ASSEMBLER_NAME (complete);
165 tree base_name = DECL_ASSEMBLER_NAME (base);
166 char *grp_name;
167 const char *p, *q;
168 bool diff_seen = false;
169 size_t idx;
170 gcc_assert (IDENTIFIER_LENGTH (complete_name)
171 == IDENTIFIER_LENGTH (base_name));
172 grp_name = XALLOCAVEC (char, IDENTIFIER_LENGTH (complete_name) + 1);
173 p = IDENTIFIER_POINTER (complete_name);
174 q = IDENTIFIER_POINTER (base_name);
175 for (idx = 0; idx < IDENTIFIER_LENGTH (complete_name); idx++)
176 if (p[idx] == q[idx])
177 grp_name[idx] = p[idx];
178 else
180 gcc_assert (!diff_seen
181 && idx > 0
182 && (p[idx - 1] == 'C' || p[idx - 1] == 'D')
183 && p[idx] == '1'
184 && q[idx] == '2');
185 grp_name[idx] = '5';
186 diff_seen = true;
188 grp_name[idx] = '\0';
189 gcc_assert (diff_seen);
190 return get_identifier (grp_name);
193 /* Returns true iff we can make the base and complete [cd]tor aliases of
194 the same symbol rather than separate functions. */
196 static bool
197 can_alias_cdtor (tree fn)
199 #ifndef ASM_OUTPUT_DEF
200 /* If aliases aren't supported by the assembler, fail. */
201 return false;
202 #endif
203 /* We can't use an alias if there are virtual bases. */
204 if (CLASSTYPE_VBASECLASSES (DECL_CONTEXT (fn)))
205 return false;
206 /* ??? Why not use aliases with -frepo? */
207 if (flag_use_repository)
208 return false;
209 gcc_assert (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (fn)
210 || DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (fn));
211 /* Don't use aliases for weak/linkonce definitions unless we can put both
212 symbols in the same COMDAT group. */
213 return (DECL_INTERFACE_KNOWN (fn)
214 && (SUPPORTS_ONE_ONLY || !DECL_WEAK (fn))
215 && (!DECL_ONE_ONLY (fn)
216 || (HAVE_COMDAT_GROUP && DECL_WEAK (fn))));
219 /* FN is a [cd]tor, fns is a pointer to an array of length 3. Fill fns
220 with pointers to the base, complete, and deleting variants. */
222 static void
223 populate_clone_array (tree fn, tree *fns)
225 tree clone;
227 fns[0] = NULL_TREE;
228 fns[1] = NULL_TREE;
229 fns[2] = NULL_TREE;
231 /* Look for the complete destructor which may be used to build the
232 delete destructor. */
233 FOR_EACH_CLONE (clone, fn)
234 if (DECL_NAME (clone) == complete_dtor_identifier
235 || DECL_NAME (clone) == complete_ctor_identifier)
236 fns[1] = clone;
237 else if (DECL_NAME (clone) == base_dtor_identifier
238 || DECL_NAME (clone) == base_ctor_identifier)
239 fns[0] = clone;
240 else if (DECL_NAME (clone) == deleting_dtor_identifier)
241 fns[2] = clone;
242 else
243 gcc_unreachable ();
246 /* FN is a constructor or destructor, and there are FUNCTION_DECLs
247 cloned from it nearby. Instead of cloning this body, leave it
248 alone and create tiny one-call bodies for the cloned
249 FUNCTION_DECLs. These clones are sibcall candidates, and their
250 resulting code will be very thunk-esque. */
252 static bool
253 maybe_thunk_body (tree fn, bool force)
255 tree bind, block, call, clone, clone_result, fn_parm, fn_parm_typelist;
256 tree last_arg, modify, *args;
257 int parmno, vtt_parmno, max_parms;
258 tree fns[3];
260 if (!force && !flag_declone_ctor_dtor)
261 return 0;
263 /* If function accepts variable arguments, give up. */
264 last_arg = tree_last (TYPE_ARG_TYPES (TREE_TYPE (fn)));
265 if (last_arg != void_list_node)
266 return 0;
268 /* If we got this far, we've decided to turn the clones into thunks. */
270 /* We're going to generate code for fn, so it is no longer "abstract."
271 Also make the unified ctor/dtor private to either the translation unit
272 (for non-vague linkage ctors) or the COMDAT group (otherwise). */
274 populate_clone_array (fn, fns);
275 DECL_ABSTRACT_P (fn) = false;
276 if (!DECL_WEAK (fn))
278 TREE_PUBLIC (fn) = false;
279 DECL_EXTERNAL (fn) = false;
280 DECL_INTERFACE_KNOWN (fn) = true;
282 else if (HAVE_COMDAT_GROUP)
284 tree comdat_group = cdtor_comdat_group (fns[1], fns[0]);
285 cgraph_node::get_create (fns[0])->set_comdat_group (comdat_group);
286 cgraph_node::get_create (fns[1])->add_to_same_comdat_group
287 (cgraph_node::get_create (fns[0]));
288 symtab_node::get (fn)->add_to_same_comdat_group
289 (symtab_node::get (fns[0]));
290 if (fns[2])
291 /* If *[CD][12]* dtors go into the *[CD]5* comdat group and dtor is
292 virtual, it goes into the same comdat group as well. */
293 cgraph_node::get_create (fns[2])->add_to_same_comdat_group
294 (symtab_node::get (fns[0]));
295 TREE_PUBLIC (fn) = false;
296 DECL_EXTERNAL (fn) = false;
297 DECL_INTERFACE_KNOWN (fn) = true;
298 /* function_and_variable_visibility doesn't want !PUBLIC decls to
299 have these flags set. */
300 DECL_WEAK (fn) = false;
301 DECL_COMDAT (fn) = false;
304 /* Find the vtt_parm, if present. */
305 for (vtt_parmno = -1, parmno = 0, fn_parm = DECL_ARGUMENTS (fn);
306 fn_parm;
307 ++parmno, fn_parm = TREE_CHAIN (fn_parm))
309 if (DECL_ARTIFICIAL (fn_parm)
310 && DECL_NAME (fn_parm) == vtt_parm_identifier)
312 /* Compensate for removed in_charge parameter. */
313 vtt_parmno = parmno;
314 break;
318 /* Allocate an argument buffer for build_cxx_call().
319 Make sure it is large enough for any of the clones. */
320 max_parms = 0;
321 FOR_EACH_CLONE (clone, fn)
323 int length = list_length (DECL_ARGUMENTS (fn));
324 if (length > max_parms)
325 max_parms = length;
327 args = (tree *) alloca (max_parms * sizeof (tree));
329 /* We know that any clones immediately follow FN in TYPE_METHODS. */
330 FOR_EACH_CLONE (clone, fn)
332 tree clone_parm;
334 /* If we've already generated a body for this clone, avoid
335 duplicating it. (Is it possible for a clone-list to grow after we
336 first see it?) */
337 if (DECL_SAVED_TREE (clone) || TREE_ASM_WRITTEN (clone))
338 continue;
340 /* Start processing the function. */
341 start_preparsed_function (clone, NULL_TREE, SF_PRE_PARSED);
343 if (clone == fns[2])
345 for (clone_parm = DECL_ARGUMENTS (clone); clone_parm;
346 clone_parm = TREE_CHAIN (clone_parm))
347 DECL_ABSTRACT_ORIGIN (clone_parm) = NULL_TREE;
348 /* Build the delete destructor by calling complete destructor and
349 delete function. */
350 build_delete_destructor_body (clone, fns[1]);
352 else
354 /* Walk parameter lists together, creating parameter list for
355 call to original function. */
356 for (parmno = 0,
357 fn_parm = DECL_ARGUMENTS (fn),
358 fn_parm_typelist = TYPE_ARG_TYPES (TREE_TYPE (fn)),
359 clone_parm = DECL_ARGUMENTS (clone);
360 fn_parm;
361 ++parmno,
362 fn_parm = TREE_CHAIN (fn_parm))
364 if (parmno == vtt_parmno && ! DECL_HAS_VTT_PARM_P (clone))
366 gcc_assert (fn_parm_typelist);
367 /* Clobber argument with formal parameter type. */
368 args[parmno]
369 = convert (TREE_VALUE (fn_parm_typelist),
370 null_pointer_node);
372 else if (parmno == 1 && DECL_HAS_IN_CHARGE_PARM_P (fn))
374 tree in_charge
375 = copy_node (in_charge_arg_for_name (DECL_NAME (clone)));
376 args[parmno] = in_charge;
378 /* Map other parameters to their equivalents in the cloned
379 function. */
380 else
382 gcc_assert (clone_parm);
383 DECL_ABSTRACT_ORIGIN (clone_parm) = NULL;
384 args[parmno] = clone_parm;
385 clone_parm = TREE_CHAIN (clone_parm);
387 if (fn_parm_typelist)
388 fn_parm_typelist = TREE_CHAIN (fn_parm_typelist);
391 /* We built this list backwards; fix now. */
392 mark_used (fn);
393 call = build_cxx_call (fn, parmno, args, tf_warning_or_error);
394 /* Arguments passed to the thunk by invisible reference should
395 be transmitted to the callee unchanged. Do not create a
396 temporary and invoke the copy constructor. The thunking
397 transformation must not introduce any constructor calls. */
398 CALL_FROM_THUNK_P (call) = 1;
399 block = make_node (BLOCK);
400 if (targetm.cxx.cdtor_returns_this ())
402 clone_result = DECL_RESULT (clone);
403 modify = build2 (MODIFY_EXPR, TREE_TYPE (clone_result),
404 clone_result, call);
405 modify = build1 (RETURN_EXPR, void_type_node, modify);
406 add_stmt (modify);
408 else
410 add_stmt (call);
412 bind = c_build_bind_expr (DECL_SOURCE_LOCATION (clone),
413 block, cur_stmt_list);
414 DECL_SAVED_TREE (clone) = push_stmt_list ();
415 add_stmt (bind);
418 DECL_ABSTRACT_ORIGIN (clone) = NULL;
419 expand_or_defer_fn (finish_function (0));
421 return 1;
424 /* FN is a function that has a complete body. Clone the body as
425 necessary. Returns nonzero if there's no longer any need to
426 process the main body. */
428 bool
429 maybe_clone_body (tree fn)
431 tree comdat_group = NULL_TREE;
432 tree clone;
433 tree fns[3];
434 bool first = true;
435 int idx;
436 bool need_alias = false;
438 /* We only clone constructors and destructors. */
439 if (!DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (fn)
440 && !DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (fn))
441 return 0;
443 populate_clone_array (fn, fns);
445 /* Remember if we can't have multiple clones for some reason. We need to
446 check this before we remap local static initializers in clone_body. */
447 if (!tree_versionable_function_p (fn))
448 need_alias = true;
450 /* We know that any clones immediately follow FN in the TYPE_METHODS
451 list. */
452 push_to_top_level ();
453 for (idx = 0; idx < 3; idx++)
455 tree parm;
456 tree clone_parm;
458 clone = fns[idx];
459 if (!clone)
460 continue;
462 /* Update CLONE's source position information to match FN's. */
463 DECL_SOURCE_LOCATION (clone) = DECL_SOURCE_LOCATION (fn);
464 DECL_DECLARED_INLINE_P (clone) = DECL_DECLARED_INLINE_P (fn);
465 DECL_DECLARED_CONSTEXPR_P (clone) = DECL_DECLARED_CONSTEXPR_P (fn);
466 DECL_COMDAT (clone) = DECL_COMDAT (fn);
467 DECL_WEAK (clone) = DECL_WEAK (fn);
469 /* We don't copy the comdat group from fn to clone because the assembler
470 name of fn was corrupted by write_mangled_name by adding *INTERNAL*
471 to it. By doing so, it also corrupted the comdat group. */
472 if (DECL_ONE_ONLY (fn))
473 cgraph_node::get_create (clone)->set_comdat_group (cxx_comdat_group (clone));
474 DECL_USE_TEMPLATE (clone) = DECL_USE_TEMPLATE (fn);
475 DECL_EXTERNAL (clone) = DECL_EXTERNAL (fn);
476 DECL_INTERFACE_KNOWN (clone) = DECL_INTERFACE_KNOWN (fn);
477 DECL_NOT_REALLY_EXTERN (clone) = DECL_NOT_REALLY_EXTERN (fn);
478 TREE_PUBLIC (clone) = TREE_PUBLIC (fn);
479 DECL_VISIBILITY (clone) = DECL_VISIBILITY (fn);
480 DECL_VISIBILITY_SPECIFIED (clone) = DECL_VISIBILITY_SPECIFIED (fn);
481 DECL_DLLIMPORT_P (clone) = DECL_DLLIMPORT_P (fn);
482 DECL_ATTRIBUTES (clone) = copy_list (DECL_ATTRIBUTES (fn));
483 DECL_DISREGARD_INLINE_LIMITS (clone) = DECL_DISREGARD_INLINE_LIMITS (fn);
484 set_decl_section_name (clone, DECL_SECTION_NAME (fn));
486 /* Adjust the parameter names and locations. */
487 parm = DECL_ARGUMENTS (fn);
488 clone_parm = DECL_ARGUMENTS (clone);
489 /* Update the `this' parameter, which is always first. */
490 update_cloned_parm (parm, clone_parm, first);
491 parm = DECL_CHAIN (parm);
492 clone_parm = DECL_CHAIN (clone_parm);
493 if (DECL_HAS_IN_CHARGE_PARM_P (fn))
494 parm = DECL_CHAIN (parm);
495 if (DECL_HAS_VTT_PARM_P (fn))
496 parm = DECL_CHAIN (parm);
497 if (DECL_HAS_VTT_PARM_P (clone))
498 clone_parm = DECL_CHAIN (clone_parm);
499 for (; parm;
500 parm = DECL_CHAIN (parm), clone_parm = DECL_CHAIN (clone_parm))
501 /* Update this parameter. */
502 update_cloned_parm (parm, clone_parm, first);
505 bool can_alias = can_alias_cdtor (fn);
507 /* If we decide to turn clones into thunks, they will branch to fn.
508 Must have original function available to call. */
509 if (!can_alias && maybe_thunk_body (fn, need_alias))
511 pop_from_top_level ();
512 /* We still need to emit the original function. */
513 return 0;
516 /* Emit the DWARF1 abstract instance. */
517 (*debug_hooks->deferred_inline_function) (fn);
519 /* We know that any clones immediately follow FN in the TYPE_METHODS list. */
520 for (idx = 0; idx < 3; idx++)
522 tree parm;
523 tree clone_parm;
524 int parmno;
525 hash_map<tree, tree> *decl_map;
526 bool alias = false;
528 clone = fns[idx];
529 if (!clone)
530 continue;
532 /* Start processing the function. */
533 start_preparsed_function (clone, NULL_TREE, SF_PRE_PARSED);
535 /* Tell cgraph if both ctors or both dtors are known to have
536 the same body. */
537 if (can_alias
538 && fns[0]
539 && idx == 1
540 && cgraph_node::get_create (fns[0])->create_same_body_alias
541 (clone, fns[0]))
543 alias = true;
544 if (DECL_ONE_ONLY (fns[0]))
546 /* For comdat base and complete cdtors put them
547 into the same, *[CD]5* comdat group instead of
548 *[CD][12]*. */
549 comdat_group = cdtor_comdat_group (fns[1], fns[0]);
550 cgraph_node::get_create (fns[0])->set_comdat_group (comdat_group);
551 if (symtab_node::get (clone)->same_comdat_group)
552 symtab_node::get (clone)->remove_from_same_comdat_group ();
553 symtab_node::get (clone)->add_to_same_comdat_group
554 (symtab_node::get (fns[0]));
558 /* Build the delete destructor by calling complete destructor
559 and delete function. */
560 if (idx == 2)
562 build_delete_destructor_body (clone, fns[1]);
563 /* If *[CD][12]* dtors go into the *[CD]5* comdat group and dtor is
564 virtual, it goes into the same comdat group as well. */
565 if (comdat_group)
566 cgraph_node::get_create (clone)->add_to_same_comdat_group
567 (symtab_node::get (fns[0]));
569 else if (alias)
570 /* No need to populate body. */ ;
571 else
573 /* If we can't have multiple copies of FN (say, because there's a
574 static local initialized with the address of a label), we need
575 to use an alias for the complete variant. */
576 if (idx == 1 && need_alias)
578 if (DECL_STRUCT_FUNCTION (fn)->cannot_be_copied_set)
579 sorry (DECL_STRUCT_FUNCTION (fn)->cannot_be_copied_reason, fn);
580 else
581 sorry ("making multiple clones of %qD", fn);
584 /* Remap the parameters. */
585 decl_map = new hash_map<tree, tree>;
586 for (parmno = 0,
587 parm = DECL_ARGUMENTS (fn),
588 clone_parm = DECL_ARGUMENTS (clone);
589 parm;
590 ++parmno,
591 parm = DECL_CHAIN (parm))
593 /* Map the in-charge parameter to an appropriate constant. */
594 if (DECL_HAS_IN_CHARGE_PARM_P (fn) && parmno == 1)
596 tree in_charge;
597 in_charge = in_charge_arg_for_name (DECL_NAME (clone));
598 decl_map->put (parm, in_charge);
600 else if (DECL_ARTIFICIAL (parm)
601 && DECL_NAME (parm) == vtt_parm_identifier)
603 /* For a subobject constructor or destructor, the next
604 argument is the VTT parameter. Remap the VTT_PARM
605 from the CLONE to this parameter. */
606 if (DECL_HAS_VTT_PARM_P (clone))
608 DECL_ABSTRACT_ORIGIN (clone_parm) = parm;
609 decl_map->put (parm, clone_parm);
610 clone_parm = DECL_CHAIN (clone_parm);
612 /* Otherwise, map the VTT parameter to `NULL'. */
613 else
615 tree t
616 = fold_convert (TREE_TYPE (parm), null_pointer_node);
617 decl_map->put (parm, t);
620 /* Map other parameters to their equivalents in the cloned
621 function. */
622 else
624 decl_map->put (parm, clone_parm);
625 clone_parm = DECL_CHAIN (clone_parm);
629 if (targetm.cxx.cdtor_returns_this ())
631 parm = DECL_RESULT (fn);
632 clone_parm = DECL_RESULT (clone);
633 decl_map->put (parm, clone_parm);
636 /* Clone the body. */
637 clone_body (clone, fn, decl_map);
639 /* Clean up. */
640 delete decl_map;
643 /* The clone can throw iff the original function can throw. */
644 cp_function_chain->can_throw = !TREE_NOTHROW (fn);
646 /* Now, expand this function into RTL, if appropriate. */
647 finish_function (0);
648 BLOCK_ABSTRACT_ORIGIN (DECL_INITIAL (clone)) = DECL_INITIAL (fn);
649 if (alias)
651 if (expand_or_defer_fn_1 (clone))
652 emit_associated_thunks (clone);
654 else
655 expand_or_defer_fn (clone);
656 first = false;
658 pop_from_top_level ();
660 /* We don't need to process the original function any further. */
661 return 1;