Mercurial > hg > CbC > CbC_gcc
comparison gcc/function.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Structure for saving state for a nested function. | 1 /* Structure for saving state for a nested function. |
2 Copyright (C) 1989-2017 Free Software Foundation, Inc. | 2 Copyright (C) 1989-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it under | 6 GCC is free software; you can redistribute it and/or modify it under |
7 the terms of the GNU General Public License as published by the Free | 7 the terms of the GNU General Public License as published by the Free |
92 #define REGNO_POINTER_ALIGN(REGNO) (crtl->emit.regno_pointer_align[REGNO]) | 92 #define REGNO_POINTER_ALIGN(REGNO) (crtl->emit.regno_pointer_align[REGNO]) |
93 | 93 |
94 struct GTY(()) expr_status { | 94 struct GTY(()) expr_status { |
95 /* Number of units that we should eventually pop off the stack. | 95 /* Number of units that we should eventually pop off the stack. |
96 These are the arguments to function calls that have already returned. */ | 96 These are the arguments to function calls that have already returned. */ |
97 int x_pending_stack_adjust; | 97 poly_int64_pod x_pending_stack_adjust; |
98 | 98 |
99 /* Under some ABIs, it is the caller's responsibility to pop arguments | 99 /* Under some ABIs, it is the caller's responsibility to pop arguments |
100 pushed for function calls. A naive implementation would simply pop | 100 pushed for function calls. A naive implementation would simply pop |
101 the arguments immediately after each call. However, if several | 101 the arguments immediately after each call. However, if several |
102 function calls are made in a row, it is typically cheaper to pop | 102 function calls are made in a row, it is typically cheaper to pop |
115 | 115 |
116 /* If PREFERRED_STACK_BOUNDARY and PUSH_ROUNDING are defined, the stack | 116 /* If PREFERRED_STACK_BOUNDARY and PUSH_ROUNDING are defined, the stack |
117 boundary can be momentarily unaligned while pushing the arguments. | 117 boundary can be momentarily unaligned while pushing the arguments. |
118 Record the delta since last aligned boundary here in order to get | 118 Record the delta since last aligned boundary here in order to get |
119 stack alignment in the nested function calls working right. */ | 119 stack alignment in the nested function calls working right. */ |
120 int x_stack_pointer_delta; | 120 poly_int64_pod x_stack_pointer_delta; |
121 | 121 |
122 /* Nonzero means __builtin_saveregs has already been done in this function. | 122 /* Nonzero means __builtin_saveregs has already been done in this function. |
123 The value is the pseudoreg containing the value __builtin_saveregs | 123 The value is the pseudoreg containing the value __builtin_saveregs |
124 returned. */ | 124 returned. */ |
125 rtx x_saveregs_value; | 125 rtx x_saveregs_value; |
185 reasons. */ | 185 reasons. */ |
186 struct GTY(()) frame_space | 186 struct GTY(()) frame_space |
187 { | 187 { |
188 struct frame_space *next; | 188 struct frame_space *next; |
189 | 189 |
190 HOST_WIDE_INT start; | 190 poly_int64 start; |
191 HOST_WIDE_INT length; | 191 poly_int64 length; |
192 }; | 192 }; |
193 | 193 |
194 struct GTY(()) stack_usage | 194 struct GTY(()) stack_usage |
195 { | 195 { |
196 /* # of bytes of static stack space allocated by the function. */ | 196 /* # of bytes of static stack space allocated by the function. */ |
198 | 198 |
199 /* # of bytes of dynamic stack space allocated by the function. This is | 199 /* # of bytes of dynamic stack space allocated by the function. This is |
200 meaningful only if has_unbounded_dynamic_stack_size is zero. */ | 200 meaningful only if has_unbounded_dynamic_stack_size is zero. */ |
201 HOST_WIDE_INT dynamic_stack_size; | 201 HOST_WIDE_INT dynamic_stack_size; |
202 | 202 |
203 /* # of bytes of space pushed onto the stack after the prologue. If | 203 /* Upper bound on the number of bytes pushed onto the stack after the |
204 !ACCUMULATE_OUTGOING_ARGS, it contains the outgoing arguments. */ | 204 prologue. If !ACCUMULATE_OUTGOING_ARGS, it contains the outgoing |
205 int pushed_stack_size; | 205 arguments. */ |
206 poly_int64 pushed_stack_size; | |
206 | 207 |
207 /* Nonzero if the amount of stack space allocated dynamically cannot | 208 /* Nonzero if the amount of stack space allocated dynamically cannot |
208 be bounded at compile-time. */ | 209 be bounded at compile-time. */ |
209 unsigned int has_unbounded_dynamic_stack_size : 1; | 210 unsigned int has_unbounded_dynamic_stack_size : 1; |
210 }; | 211 }; |
260 tree nonlocal_goto_save_area; | 261 tree nonlocal_goto_save_area; |
261 | 262 |
262 /* Vector of function local variables, functions, types and constants. */ | 263 /* Vector of function local variables, functions, types and constants. */ |
263 vec<tree, va_gc> *local_decls; | 264 vec<tree, va_gc> *local_decls; |
264 | 265 |
265 /* In a Cilk function, the VAR_DECL for the frame descriptor. */ | |
266 tree cilk_frame_decl; | |
267 | |
268 /* For md files. */ | 266 /* For md files. */ |
269 | 267 |
270 /* tm.h can use this to store whatever it likes. */ | 268 /* tm.h can use this to store whatever it likes. */ |
271 struct machine_function * GTY ((maybe_undef)) machine; | 269 struct machine_function * GTY ((maybe_undef)) machine; |
272 | 270 |
282 struct dw_fde_node *fde; | 280 struct dw_fde_node *fde; |
283 | 281 |
284 /* Last statement uid. */ | 282 /* Last statement uid. */ |
285 int last_stmt_uid; | 283 int last_stmt_uid; |
286 | 284 |
285 /* Debug marker counter. Count begin stmt markers. We don't have | |
286 to keep it exact, it's more of a rough estimate to enable us to | |
287 decide whether they are too many to copy during inlining, or when | |
288 expanding to RTL. */ | |
289 int debug_marker_count; | |
290 | |
287 /* Function sequence number for profiling, debugging, etc. */ | 291 /* Function sequence number for profiling, debugging, etc. */ |
288 int funcdef_no; | 292 int funcdef_no; |
289 | 293 |
290 /* Line number of the start of the function for debugging purposes. */ | 294 /* Line number of the start of the function for debugging purposes. */ |
291 location_t function_start_locus; | 295 location_t function_start_locus; |
321 | 325 |
322 /* Nonzero if function being compiled can call alloca, | 326 /* Nonzero if function being compiled can call alloca, |
323 either as a subroutine or builtin. */ | 327 either as a subroutine or builtin. */ |
324 unsigned int calls_alloca : 1; | 328 unsigned int calls_alloca : 1; |
325 | 329 |
326 /* This will indicate whether a function is a cilk function */ | |
327 unsigned int is_cilk_function : 1; | |
328 | |
329 /* Nonzero if this is a Cilk function that spawns. */ | |
330 unsigned int calls_cilk_spawn : 1; | |
331 | |
332 /* Nonzero if function being compiled receives nonlocal gotos | 330 /* Nonzero if function being compiled receives nonlocal gotos |
333 from nested functions. */ | 331 from nested functions. */ |
334 unsigned int has_nonlocal_label : 1; | 332 unsigned int has_nonlocal_label : 1; |
335 | 333 |
336 /* Nonzero if function being compiled has a forced label | 334 /* Nonzero if function being compiled has a forced label |
383 | 381 |
384 /* Nonzero if the current function contains any loops with | 382 /* Nonzero if the current function contains any loops with |
385 nonzero value in loop->simduid. */ | 383 nonzero value in loop->simduid. */ |
386 unsigned int has_simduid_loops : 1; | 384 unsigned int has_simduid_loops : 1; |
387 | 385 |
388 /* Set when the tail call has been identified. */ | 386 /* Nonzero when the tail call has been identified. */ |
389 unsigned int tail_call_marked : 1; | 387 unsigned int tail_call_marked : 1; |
388 | |
389 /* Nonzero if the current function contains a #pragma GCC unroll. */ | |
390 unsigned int has_unroll : 1; | |
391 | |
392 /* Set when the function was compiled with generation of debug | |
393 (begin stmt, inline entry, ...) markers enabled. */ | |
394 unsigned int debug_nonbind_markers : 1; | |
390 }; | 395 }; |
391 | 396 |
392 /* Add the decl D to the local_decls list of FUN. */ | 397 /* Add the decl D to the local_decls list of FUN. */ |
393 | 398 |
394 void add_local_decl (struct function *fun, tree d); | 399 void add_local_decl (struct function *fun, tree d); |
474 also used to store offsets from the stack, which might be negative, | 479 also used to store offsets from the stack, which might be negative, |
475 so the variable part must be ssizetype, not sizetype. */ | 480 so the variable part must be ssizetype, not sizetype. */ |
476 | 481 |
477 struct args_size | 482 struct args_size |
478 { | 483 { |
479 HOST_WIDE_INT constant; | 484 poly_int64_pod constant; |
480 tree var; | 485 tree var; |
481 }; | 486 }; |
482 | 487 |
483 /* Package up various arg related fields of struct args for | 488 /* Package up various arg related fields of struct args for |
484 locate_and_pad_parm. */ | 489 locate_and_pad_parm. */ |
536 : size_binop (PLUS_EXPR, fold_convert (ssizetype, (SIZE).var), \ | 541 : size_binop (PLUS_EXPR, fold_convert (ssizetype, (SIZE).var), \ |
537 ssize_int ((SIZE).constant))) | 542 ssize_int ((SIZE).constant))) |
538 | 543 |
539 /* Convert the implicit sum in a `struct args_size' into an rtx. */ | 544 /* Convert the implicit sum in a `struct args_size' into an rtx. */ |
540 #define ARGS_SIZE_RTX(SIZE) \ | 545 #define ARGS_SIZE_RTX(SIZE) \ |
541 ((SIZE).var == 0 ? GEN_INT ((SIZE).constant) \ | 546 ((SIZE).var == 0 ? gen_int_mode ((SIZE).constant, Pmode) \ |
542 : expand_normal (ARGS_SIZE_TREE (SIZE))) | 547 : expand_normal (ARGS_SIZE_TREE (SIZE))) |
543 | 548 |
544 #define ASLK_REDUCE_ALIGN 1 | 549 #define ASLK_REDUCE_ALIGN 1 |
545 #define ASLK_RECORD_PAD 2 | 550 #define ASLK_RECORD_PAD 2 |
546 | 551 |
569 extern void free_after_compilation (struct function *); | 574 extern void free_after_compilation (struct function *); |
570 | 575 |
571 /* Return size needed for stack frame based on slots so far allocated. | 576 /* Return size needed for stack frame based on slots so far allocated. |
572 This size counts from zero. It is not rounded to STACK_BOUNDARY; | 577 This size counts from zero. It is not rounded to STACK_BOUNDARY; |
573 the caller may have to do that. */ | 578 the caller may have to do that. */ |
574 extern HOST_WIDE_INT get_frame_size (void); | 579 extern poly_int64 get_frame_size (void); |
575 | 580 |
576 /* Issue an error message and return TRUE if frame OFFSET overflows in | 581 /* Issue an error message and return TRUE if frame OFFSET overflows in |
577 the signed target pointer arithmetics for function FUNC. Otherwise | 582 the signed target pointer arithmetics for function FUNC. Otherwise |
578 return FALSE. */ | 583 return FALSE. */ |
579 extern bool frame_offset_overflow (HOST_WIDE_INT, tree); | 584 extern bool frame_offset_overflow (poly_int64, tree); |
580 | 585 |
581 extern unsigned int spill_slot_alignment (machine_mode); | 586 extern unsigned int spill_slot_alignment (machine_mode); |
582 | 587 |
583 extern rtx assign_stack_local_1 (machine_mode, HOST_WIDE_INT, int, int); | 588 extern rtx assign_stack_local_1 (machine_mode, poly_int64, int, int); |
584 extern rtx assign_stack_local (machine_mode, HOST_WIDE_INT, int); | 589 extern rtx assign_stack_local (machine_mode, poly_int64, int); |
585 extern rtx assign_stack_temp_for_type (machine_mode, HOST_WIDE_INT, tree); | 590 extern rtx assign_stack_temp_for_type (machine_mode, poly_int64, tree); |
586 extern rtx assign_stack_temp (machine_mode, HOST_WIDE_INT); | 591 extern rtx assign_stack_temp (machine_mode, poly_int64); |
587 extern rtx assign_temp (tree, int, int); | 592 extern rtx assign_temp (tree, int, int); |
588 extern void update_temp_slot_address (rtx, rtx); | 593 extern void update_temp_slot_address (rtx, rtx); |
589 extern void preserve_temp_slots (rtx); | 594 extern void preserve_temp_slots (rtx); |
590 extern void free_temp_slots (void); | 595 extern void free_temp_slots (void); |
591 extern void push_temp_slots (void); | 596 extern void push_temp_slots (void); |
600 | 605 |
601 extern bool initial_value_entry (int i, rtx *, rtx *); | 606 extern bool initial_value_entry (int i, rtx *, rtx *); |
602 extern void instantiate_decl_rtl (rtx x); | 607 extern void instantiate_decl_rtl (rtx x); |
603 extern int aggregate_value_p (const_tree, const_tree); | 608 extern int aggregate_value_p (const_tree, const_tree); |
604 extern bool use_register_for_decl (const_tree); | 609 extern bool use_register_for_decl (const_tree); |
605 extern gimple_seq gimplify_parameters (void); | 610 extern gimple_seq gimplify_parameters (gimple_seq *); |
606 extern void locate_and_pad_parm (machine_mode, tree, int, int, int, | 611 extern void locate_and_pad_parm (machine_mode, tree, int, int, int, |
607 tree, struct args_size *, | 612 tree, struct args_size *, |
608 struct locate_and_pad_arg_data *); | 613 struct locate_and_pad_arg_data *); |
609 extern void generate_setjmp_warnings (void); | 614 extern void generate_setjmp_warnings (void); |
610 | 615 |