function.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. /* Structure for saving state for a nested function.
  2. Copyright (C) 1989-2019 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify it under
  5. the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3, or (at your option) any later
  7. version.
  8. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef GCC_FUNCTION_H
  16. #define GCC_FUNCTION_H
  17. /* Stack of pending (incomplete) sequences saved by `start_sequence'.
  18. Each element describes one pending sequence.
  19. The main insn-chain is saved in the last element of the chain,
  20. unless the chain is empty. */
  21. struct GTY(()) sequence_stack {
  22. /* First and last insns in the chain of the saved sequence. */
  23. rtx_insn *first;
  24. rtx_insn *last;
  25. struct sequence_stack *next;
  26. };
  27. struct GTY(()) emit_status {
  28. void ensure_regno_capacity ();
  29. /* This is reset to LAST_VIRTUAL_REGISTER + 1 at the start of each function.
  30. After rtl generation, it is 1 plus the largest register number used. */
  31. int x_reg_rtx_no;
  32. /* Lowest label number in current function. */
  33. int x_first_label_num;
  34. /* seq.first and seq.last are the ends of the doubly-linked chain of
  35. rtl for the current function. Both are reset to null at the
  36. start of rtl generation for the function.
  37. start_sequence saves both of these on seq.next and then starts
  38. a new, nested sequence of insns.
  39. seq.next is a stack of pending (incomplete) sequences saved by
  40. start_sequence. Each element describes one pending sequence.
  41. The main insn-chain is the last element of the chain. */
  42. struct sequence_stack seq;
  43. /* INSN_UID for next insn emitted.
  44. Reset to 1 for each function compiled. */
  45. int x_cur_insn_uid;
  46. /* INSN_UID for next debug insn emitted. Only used if
  47. --param min-nondebug-insn-uid=<value> is given with nonzero value. */
  48. int x_cur_debug_insn_uid;
  49. /* The length of the regno_pointer_align, regno_decl, and x_regno_reg_rtx
  50. vectors. Since these vectors are needed during the expansion phase when
  51. the total number of registers in the function is not yet known, the
  52. vectors are copied and made bigger when necessary. */
  53. int regno_pointer_align_length;
  54. /* Indexed by pseudo register number, if nonzero gives the known alignment
  55. for that pseudo (if REG_POINTER is set in x_regno_reg_rtx).
  56. Allocated in parallel with x_regno_reg_rtx. */
  57. unsigned char * GTY((skip)) regno_pointer_align;
  58. };
  59. /* Indexed by register number, gives an rtx for that register (and only
  60. that register). For pseudo registers, it is the unique rtx for
  61. that pseudo. For hard registers, it is an rtx of the mode specified
  62. by reg_raw_mode.
  63. FIXME: We could put it into emit_status struct, but gengtype is not
  64. able to deal with length attribute nested in top level structures. */
  65. extern GTY ((length ("crtl->emit.x_reg_rtx_no"))) rtx * regno_reg_rtx;
  66. /* For backward compatibility... eventually these should all go away. */
  67. #define reg_rtx_no (crtl->emit.x_reg_rtx_no)
  68. #define REGNO_POINTER_ALIGN(REGNO) (crtl->emit.regno_pointer_align[REGNO])
  69. struct GTY(()) expr_status {
  70. /* Number of units that we should eventually pop off the stack.
  71. These are the arguments to function calls that have already returned. */
  72. poly_int64_pod x_pending_stack_adjust;
  73. /* Under some ABIs, it is the caller's responsibility to pop arguments
  74. pushed for function calls. A naive implementation would simply pop
  75. the arguments immediately after each call. However, if several
  76. function calls are made in a row, it is typically cheaper to pop
  77. all the arguments after all of the calls are complete since a
  78. single pop instruction can be used. Therefore, GCC attempts to
  79. defer popping the arguments until absolutely necessary. (For
  80. example, at the end of a conditional, the arguments must be popped,
  81. since code outside the conditional won't know whether or not the
  82. arguments need to be popped.)
  83. When INHIBIT_DEFER_POP is nonzero, however, the compiler does not
  84. attempt to defer pops. Instead, the stack is popped immediately
  85. after each call. Rather then setting this variable directly, use
  86. NO_DEFER_POP and OK_DEFER_POP. */
  87. int x_inhibit_defer_pop;
  88. /* If PREFERRED_STACK_BOUNDARY and PUSH_ROUNDING are defined, the stack
  89. boundary can be momentarily unaligned while pushing the arguments.
  90. Record the delta since last aligned boundary here in order to get
  91. stack alignment in the nested function calls working right. */
  92. poly_int64_pod x_stack_pointer_delta;
  93. /* Nonzero means __builtin_saveregs has already been done in this function.
  94. The value is the pseudoreg containing the value __builtin_saveregs
  95. returned. */
  96. rtx x_saveregs_value;
  97. /* Similarly for __builtin_apply_args. */
  98. rtx x_apply_args_value;
  99. /* List of labels that must never be deleted. */
  100. vec<rtx_insn *, va_gc> *x_forced_labels;
  101. };
  102. typedef struct call_site_record_d *call_site_record;
  103. /* RTL representation of exception handling. */
  104. struct GTY(()) rtl_eh {
  105. rtx ehr_stackadj;
  106. rtx ehr_handler;
  107. rtx_code_label *ehr_label;
  108. rtx sjlj_fc;
  109. rtx_insn *sjlj_exit_after;
  110. vec<uchar, va_gc> *action_record_data;
  111. vec<call_site_record, va_gc> *call_site_record_v[2];
  112. };
  113. #define pending_stack_adjust (crtl->expr.x_pending_stack_adjust)
  114. #define inhibit_defer_pop (crtl->expr.x_inhibit_defer_pop)
  115. #define saveregs_value (crtl->expr.x_saveregs_value)
  116. #define apply_args_value (crtl->expr.x_apply_args_value)
  117. #define forced_labels (crtl->expr.x_forced_labels)
  118. #define stack_pointer_delta (crtl->expr.x_stack_pointer_delta)
  119. struct gimple_df;
  120. struct call_site_record_d;
  121. struct dw_fde_node;
  122. struct GTY(()) varasm_status {
  123. /* If we're using a per-function constant pool, this is it. */
  124. struct rtx_constant_pool *pool;
  125. /* Number of tree-constants deferred during the expansion of this
  126. function. */
  127. unsigned int deferred_constants;
  128. };
  129. /* Data for function partitioning. */
  130. struct GTY(()) function_subsections {
  131. /* Assembly labels for the hot and cold text sections, to
  132. be used by debugger functions for determining the size of text
  133. sections. */
  134. const char *hot_section_label;
  135. const char *cold_section_label;
  136. const char *hot_section_end_label;
  137. const char *cold_section_end_label;
  138. };
  139. /* Describe an empty area of space in the stack frame. These can be chained
  140. into a list; this is used to keep track of space wasted for alignment
  141. reasons. */
  142. struct GTY(()) frame_space
  143. {
  144. struct frame_space *next;
  145. poly_int64 start;
  146. poly_int64 length;
  147. };
  148. struct GTY(()) stack_usage
  149. {
  150. /* # of bytes of static stack space allocated by the function. */
  151. HOST_WIDE_INT static_stack_size;
  152. /* # of bytes of dynamic stack space allocated by the function. This is
  153. meaningful only if has_unbounded_dynamic_stack_size is zero. */
  154. HOST_WIDE_INT dynamic_stack_size;
  155. /* Upper bound on the number of bytes pushed onto the stack after the
  156. prologue. If !ACCUMULATE_OUTGOING_ARGS, it contains the outgoing
  157. arguments. */
  158. poly_int64 pushed_stack_size;
  159. /* Nonzero if the amount of stack space allocated dynamically cannot
  160. be bounded at compile-time. */
  161. unsigned int has_unbounded_dynamic_stack_size : 1;
  162. };
  163. #define current_function_static_stack_size (cfun->su->static_stack_size)
  164. #define current_function_dynamic_stack_size (cfun->su->dynamic_stack_size)
  165. #define current_function_pushed_stack_size (cfun->su->pushed_stack_size)
  166. #define current_function_has_unbounded_dynamic_stack_size \
  167. (cfun->su->has_unbounded_dynamic_stack_size)
  168. #define current_function_allocates_dynamic_stack_space \
  169. (current_function_dynamic_stack_size != 0 \
  170. || current_function_has_unbounded_dynamic_stack_size)
  171. /* This structure can save all the important global and static variables
  172. describing the status of the current function. */
  173. struct GTY(()) function {
  174. struct eh_status *eh;
  175. /* The control flow graph for this function. */
  176. struct control_flow_graph *cfg;
  177. /* GIMPLE body for this function. */
  178. gimple_seq gimple_body;
  179. /* SSA and dataflow information. */
  180. struct gimple_df *gimple_df;
  181. /* The loops in this function. */
  182. struct loops *x_current_loops;
  183. /* Filled by the GIMPLE and RTL FEs, pass to start compilation with. */
  184. char *pass_startwith;
  185. /* The stack usage of this function. */
  186. struct stack_usage *su;
  187. /* Value histograms attached to particular statements. */
  188. htab_t GTY((skip)) value_histograms;
  189. /* For function.c. */
  190. /* Points to the FUNCTION_DECL of this function. */
  191. tree decl;
  192. /* A PARM_DECL that should contain the static chain for this function.
  193. It will be initialized at the beginning of the function. */
  194. tree static_chain_decl;
  195. /* An expression that contains the non-local goto save area. The first
  196. word is the saved frame pointer and the second is the saved stack
  197. pointer. */
  198. tree nonlocal_goto_save_area;
  199. /* Vector of function local variables, functions, types and constants. */
  200. vec<tree, va_gc> *local_decls;
  201. /* For md files. */
  202. /* tm.h can use this to store whatever it likes. */
  203. struct machine_function * GTY ((maybe_undef)) machine;
  204. /* Language-specific code can use this to store whatever it likes. */
  205. struct language_function * language;
  206. /* Used types hash table. */
  207. hash_set<tree> *GTY (()) used_types_hash;
  208. /* Dwarf2 Frame Description Entry, containing the Call Frame Instructions
  209. used for unwinding. Only set when either dwarf2 unwinding or dwarf2
  210. debugging is enabled. */
  211. struct dw_fde_node *fde;
  212. /* Last statement uid. */
  213. int last_stmt_uid;
  214. /* Debug marker counter. Count begin stmt markers. We don't have
  215. to keep it exact, it's more of a rough estimate to enable us to
  216. decide whether they are too many to copy during inlining, or when
  217. expanding to RTL. */
  218. int debug_marker_count;
  219. /* Function sequence number for profiling, debugging, etc. */
  220. int funcdef_no;
  221. /* Line number of the start of the function for debugging purposes. */
  222. location_t function_start_locus;
  223. /* Line number of the end of the function. */
  224. location_t function_end_locus;
  225. /* Properties used by the pass manager. */
  226. unsigned int curr_properties;
  227. unsigned int last_verified;
  228. /* Non-null if the function does something that would prevent it from
  229. being copied; this applies to both versioning and inlining. Set to
  230. a string describing the reason for failure. */
  231. const char * GTY((skip)) cannot_be_copied_reason;
  232. /* Last assigned dependence info clique. */
  233. unsigned short last_clique;
  234. /* Collected bit flags. */
  235. /* Number of units of general registers that need saving in stdarg
  236. function. What unit is depends on the backend, either it is number
  237. of bytes, or it can be number of registers. */
  238. unsigned int va_list_gpr_size : 8;
  239. /* Number of units of floating point registers that need saving in stdarg
  240. function. */
  241. unsigned int va_list_fpr_size : 8;
  242. /* Nonzero if function being compiled can call setjmp. */
  243. unsigned int calls_setjmp : 1;
  244. /* Nonzero if function being compiled can call alloca,
  245. either as a subroutine or builtin. */
  246. unsigned int calls_alloca : 1;
  247. /* Nonzero if function being compiled receives nonlocal gotos
  248. from nested functions. */
  249. unsigned int has_nonlocal_label : 1;
  250. /* Nonzero if function being compiled has a forced label
  251. placed into static storage. */
  252. unsigned int has_forced_label_in_static : 1;
  253. /* Nonzero if we've set cannot_be_copied_reason. I.e. if
  254. (cannot_be_copied_set && !cannot_be_copied_reason), the function
  255. can in fact be copied. */
  256. unsigned int cannot_be_copied_set : 1;
  257. /* Nonzero if current function uses stdarg.h or equivalent. */
  258. unsigned int stdarg : 1;
  259. unsigned int after_inlining : 1;
  260. unsigned int always_inline_functions_inlined : 1;
  261. /* Nonzero if function being compiled can throw synchronous non-call
  262. exceptions. */
  263. unsigned int can_throw_non_call_exceptions : 1;
  264. /* Nonzero if instructions that may throw exceptions but don't otherwise
  265. contribute to the execution of the program can be deleted. */
  266. unsigned int can_delete_dead_exceptions : 1;
  267. /* Fields below this point are not set for abstract functions; see
  268. allocate_struct_function. */
  269. /* Nonzero if function being compiled needs to be given an address
  270. where the value should be stored. */
  271. unsigned int returns_struct : 1;
  272. /* Nonzero if function being compiled needs to
  273. return the address of where it has put a structure value. */
  274. unsigned int returns_pcc_struct : 1;
  275. /* Nonzero if this function has local DECL_HARD_REGISTER variables.
  276. In this case code motion has to be done more carefully. */
  277. unsigned int has_local_explicit_reg_vars : 1;
  278. /* Nonzero if the current function is a thunk, i.e., a lightweight
  279. function implemented by the output_mi_thunk hook) that just
  280. adjusts one of its arguments and forwards to another
  281. function. */
  282. unsigned int is_thunk : 1;
  283. /* Nonzero if the current function contains any loops with
  284. loop->force_vectorize set. */
  285. unsigned int has_force_vectorize_loops : 1;
  286. /* Nonzero if the current function contains any loops with
  287. nonzero value in loop->simduid. */
  288. unsigned int has_simduid_loops : 1;
  289. /* Nonzero when the tail call has been identified. */
  290. unsigned int tail_call_marked : 1;
  291. /* Nonzero if the current function contains a #pragma GCC unroll. */
  292. unsigned int has_unroll : 1;
  293. /* Set when the function was compiled with generation of debug
  294. (begin stmt, inline entry, ...) markers enabled. */
  295. unsigned int debug_nonbind_markers : 1;
  296. };
  297. /* Add the decl D to the local_decls list of FUN. */
  298. void add_local_decl (struct function *fun, tree d);
  299. #define FOR_EACH_LOCAL_DECL(FUN, I, D) \
  300. FOR_EACH_VEC_SAFE_ELT_REVERSE ((FUN)->local_decls, I, D)
  301. /* If va_list_[gf]pr_size is set to this, it means we don't know how
  302. many units need to be saved. */
  303. #define VA_LIST_MAX_GPR_SIZE 255
  304. #define VA_LIST_MAX_FPR_SIZE 255
  305. /* The function currently being compiled. */
  306. extern GTY(()) struct function *cfun;
  307. /* In order to ensure that cfun is not set directly, we redefine it so
  308. that it is not an lvalue. Rather than assign to cfun, use
  309. push_cfun or set_cfun. */
  310. #define cfun (cfun + 0)
  311. /* Nonzero if we've already converted virtual regs to hard regs. */
  312. extern int virtuals_instantiated;
  313. /* Nonzero if at least one trampoline has been created. */
  314. extern int trampolines_created;
  315. struct GTY((for_user)) types_used_by_vars_entry {
  316. tree type;
  317. tree var_decl;
  318. };
  319. struct used_type_hasher : ggc_ptr_hash<types_used_by_vars_entry>
  320. {
  321. static hashval_t hash (types_used_by_vars_entry *);
  322. static bool equal (types_used_by_vars_entry *, types_used_by_vars_entry *);
  323. };
  324. /* Hash table making the relationship between a global variable
  325. and the types it references in its initializer. The key of the
  326. entry is a referenced type, and the value is the DECL of the global
  327. variable. types_use_by_vars_do_hash and types_used_by_vars_eq below are
  328. the hash and equality functions to use for this hash table. */
  329. extern GTY(()) hash_table<used_type_hasher> *types_used_by_vars_hash;
  330. void types_used_by_var_decl_insert (tree type, tree var_decl);
  331. /* During parsing of a global variable, this vector contains the types
  332. referenced by the global variable. */
  333. extern GTY(()) vec<tree, va_gc> *types_used_by_cur_var_decl;
  334. /* Return the loop tree of FN. */
  335. inline struct loops *
  336. loops_for_fn (struct function *fn)
  337. {
  338. return fn->x_current_loops;
  339. }
  340. /* Set the loop tree of FN to LOOPS. */
  341. inline void
  342. set_loops_for_fn (struct function *fn, struct loops *loops)
  343. {
  344. gcc_checking_assert (fn->x_current_loops == NULL || loops == NULL);
  345. fn->x_current_loops = loops;
  346. }
  347. /* For backward compatibility... eventually these should all go away. */
  348. #define current_function_funcdef_no (cfun->funcdef_no)
  349. #define current_loops (cfun->x_current_loops)
  350. #define dom_computed (cfun->cfg->x_dom_computed)
  351. #define n_bbs_in_dom_tree (cfun->cfg->x_n_bbs_in_dom_tree)
  352. #define VALUE_HISTOGRAMS(fun) (fun)->value_histograms
  353. /* A pointer to a function to create target specific, per-function
  354. data structures. */
  355. extern struct machine_function * (*init_machine_status) (void);
  356. /* Structure to record the size of a sequence of arguments
  357. as the sum of a tree-expression and a constant. This structure is
  358. also used to store offsets from the stack, which might be negative,
  359. so the variable part must be ssizetype, not sizetype. */
  360. struct args_size
  361. {
  362. poly_int64_pod constant;
  363. tree var;
  364. };
  365. /* Package up various arg related fields of struct args for
  366. locate_and_pad_parm. */
  367. struct locate_and_pad_arg_data
  368. {
  369. /* Size of this argument on the stack, rounded up for any padding it
  370. gets. If REG_PARM_STACK_SPACE is defined, then register parms are
  371. counted here, otherwise they aren't. */
  372. struct args_size size;
  373. /* Offset of this argument from beginning of stack-args. */
  374. struct args_size offset;
  375. /* Offset to the start of the stack slot. Different from OFFSET
  376. if this arg pads downward. */
  377. struct args_size slot_offset;
  378. /* The amount that the stack pointer needs to be adjusted to
  379. force alignment for the next argument. */
  380. struct args_size alignment_pad;
  381. /* Which way we should pad this arg. */
  382. pad_direction where_pad;
  383. /* slot_offset is at least this aligned. */
  384. unsigned int boundary;
  385. };
  386. /* Add the value of the tree INC to the `struct args_size' TO. */
  387. #define ADD_PARM_SIZE(TO, INC) \
  388. do { \
  389. tree inc = (INC); \
  390. if (tree_fits_shwi_p (inc)) \
  391. (TO).constant += tree_to_shwi (inc); \
  392. else if ((TO).var == 0) \
  393. (TO).var = fold_convert (ssizetype, inc); \
  394. else \
  395. (TO).var = size_binop (PLUS_EXPR, (TO).var, \
  396. fold_convert (ssizetype, inc)); \
  397. } while (0)
  398. #define SUB_PARM_SIZE(TO, DEC) \
  399. do { \
  400. tree dec = (DEC); \
  401. if (tree_fits_shwi_p (dec)) \
  402. (TO).constant -= tree_to_shwi (dec); \
  403. else if ((TO).var == 0) \
  404. (TO).var = size_binop (MINUS_EXPR, ssize_int (0), \
  405. fold_convert (ssizetype, dec)); \
  406. else \
  407. (TO).var = size_binop (MINUS_EXPR, (TO).var, \
  408. fold_convert (ssizetype, dec)); \
  409. } while (0)
  410. /* Convert the implicit sum in a `struct args_size' into a tree
  411. of type ssizetype. */
  412. #define ARGS_SIZE_TREE(SIZE) \
  413. ((SIZE).var == 0 ? ssize_int ((SIZE).constant) \
  414. : size_binop (PLUS_EXPR, fold_convert (ssizetype, (SIZE).var), \
  415. ssize_int ((SIZE).constant)))
  416. /* Convert the implicit sum in a `struct args_size' into an rtx. */
  417. #define ARGS_SIZE_RTX(SIZE) \
  418. ((SIZE).var == 0 ? gen_int_mode ((SIZE).constant, Pmode) \
  419. : expand_normal (ARGS_SIZE_TREE (SIZE)))
  420. #define ASLK_REDUCE_ALIGN 1
  421. #define ASLK_RECORD_PAD 2
  422. /* If pointers to member functions use the least significant bit to
  423. indicate whether a function is virtual, ensure a pointer
  424. to this function will have that bit clear. */
  425. #define MINIMUM_METHOD_BOUNDARY \
  426. ((TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn) \
  427. ? MAX (FUNCTION_BOUNDARY, 2 * BITS_PER_UNIT) : FUNCTION_BOUNDARY)
  428. enum stack_clash_probes {
  429. NO_PROBE_NO_FRAME,
  430. NO_PROBE_SMALL_FRAME,
  431. PROBE_INLINE,
  432. PROBE_LOOP
  433. };
  434. extern void dump_stack_clash_frame_info (enum stack_clash_probes, bool);
  435. extern void push_function_context (void);
  436. extern void pop_function_context (void);
  437. /* Save and restore status information for a nested function. */
  438. extern void free_after_parsing (struct function *);
  439. extern void free_after_compilation (struct function *);
  440. /* Return size needed for stack frame based on slots so far allocated.
  441. This size counts from zero. It is not rounded to STACK_BOUNDARY;
  442. the caller may have to do that. */
  443. extern poly_int64 get_frame_size (void);
  444. /* Issue an error message and return TRUE if frame OFFSET overflows in
  445. the signed target pointer arithmetics for function FUNC. Otherwise
  446. return FALSE. */
  447. extern bool frame_offset_overflow (poly_int64, tree);
  448. extern unsigned int spill_slot_alignment (machine_mode);
  449. extern rtx assign_stack_local_1 (machine_mode, poly_int64, int, int);
  450. extern rtx assign_stack_local (machine_mode, poly_int64, int);
  451. extern rtx assign_stack_temp_for_type (machine_mode, poly_int64, tree);
  452. extern rtx assign_stack_temp (machine_mode, poly_int64);
  453. extern rtx assign_temp (tree, int, int);
  454. extern void update_temp_slot_address (rtx, rtx);
  455. extern void preserve_temp_slots (rtx);
  456. extern void free_temp_slots (void);
  457. extern void push_temp_slots (void);
  458. extern void pop_temp_slots (void);
  459. extern void init_temp_slots (void);
  460. extern rtx get_hard_reg_initial_reg (rtx);
  461. extern rtx get_hard_reg_initial_val (machine_mode, unsigned int);
  462. extern rtx has_hard_reg_initial_val (machine_mode, unsigned int);
  463. /* Called from gimple_expand_cfg. */
  464. extern unsigned int emit_initial_value_sets (void);
  465. extern bool initial_value_entry (int i, rtx *, rtx *);
  466. extern void instantiate_decl_rtl (rtx x);
  467. extern int aggregate_value_p (const_tree, const_tree);
  468. extern bool use_register_for_decl (const_tree);
  469. extern gimple_seq gimplify_parameters (gimple_seq *);
  470. extern void locate_and_pad_parm (machine_mode, tree, int, int, int,
  471. tree, struct args_size *,
  472. struct locate_and_pad_arg_data *);
  473. extern void generate_setjmp_warnings (void);
  474. /* Identify BLOCKs referenced by more than one NOTE_INSN_BLOCK_{BEG,END},
  475. and create duplicate blocks. */
  476. extern void reorder_blocks (void);
  477. extern void clear_block_marks (tree);
  478. extern tree blocks_nreverse (tree);
  479. extern tree block_chainon (tree, tree);
  480. /* Set BLOCK_NUMBER for all the blocks in FN. */
  481. extern void number_blocks (tree);
  482. /* cfun shouldn't be set directly; use one of these functions instead. */
  483. extern void set_cfun (struct function *new_cfun, bool force = false);
  484. extern void push_cfun (struct function *new_cfun);
  485. extern void pop_cfun (void);
  486. extern int get_next_funcdef_no (void);
  487. extern int get_last_funcdef_no (void);
  488. extern void allocate_struct_function (tree, bool);
  489. extern void push_struct_function (tree fndecl);
  490. extern void push_dummy_function (bool);
  491. extern void pop_dummy_function (void);
  492. extern void init_dummy_function_start (void);
  493. extern void init_function_start (tree);
  494. extern void stack_protect_epilogue (void);
  495. extern void expand_function_start (tree);
  496. extern void expand_dummy_function_end (void);
  497. extern void thread_prologue_and_epilogue_insns (void);
  498. extern void diddle_return_value (void (*)(rtx, void*), void*);
  499. extern void clobber_return_register (void);
  500. extern void expand_function_end (void);
  501. extern rtx get_arg_pointer_save_area (void);
  502. extern void maybe_copy_prologue_epilogue_insn (rtx, rtx);
  503. extern int prologue_contains (const rtx_insn *);
  504. extern int epilogue_contains (const rtx_insn *);
  505. extern int prologue_epilogue_contains (const rtx_insn *);
  506. extern void record_prologue_seq (rtx_insn *);
  507. extern void record_epilogue_seq (rtx_insn *);
  508. extern void emit_return_into_block (bool simple_p, basic_block bb);
  509. extern void set_return_jump_label (rtx_insn *);
  510. extern bool active_insn_between (rtx_insn *head, rtx_insn *tail);
  511. extern vec<edge> convert_jumps_to_returns (basic_block last_bb, bool simple_p,
  512. vec<edge> unconverted);
  513. extern basic_block emit_return_for_exit (edge exit_fallthru_edge,
  514. bool simple_p);
  515. extern void reposition_prologue_and_epilogue_notes (void);
  516. /* Returns the name of the current function. */
  517. extern const char *fndecl_name (tree);
  518. extern const char *function_name (struct function *);
  519. extern const char *current_function_name (void);
  520. extern void used_types_insert (tree);
  521. #endif /* GCC_FUNCTION_H */