Advertisement

このページを編集する際は,編集に関する方針に従ってください.

概要

実装

 159 /* This structure can save all the important global and static variables
 160    describing the status of the current function.  */
161 
162 struct function GTY(())
163 {
164   struct eh_status *eh;
165   struct eh_status *saved_eh;
166   struct expr_status *expr;
167   struct emit_status *emit;
168   struct varasm_status *varasm;
169 
 170   /* The control flow graph for this function.  */
171   struct control_flow_graph *cfg;
172   struct control_flow_graph *saved_cfg;
173   bool after_inlining;
174 
 175   /* For tree-optimize.c.  */
176 
 177   /* Saved tree and arguments during tree optimization.  Used later for
 178      inlining */
179   tree saved_args;
180   tree saved_static_chain_decl;
181   tree saved_blocks;
182   tree saved_unexpanded_var_list;
183 
 184   /* For function.c.  */
185 
 186   /* Points to the FUNCTION_DECL of this function.  */
187   tree decl;
188 
 189   /* Function containing this function, if any.  */
190   struct function *outer;
191 
 192   /* Number of bytes of args popped by function being compiled on its return.
 193      Zero if no bytes are to be popped.
 194      May affect compilation of return insn or of function epilogue.  */
195   int pops_args;
196 
 197   /* If function's args have a fixed size, this is that size, in bytes.
 198      Otherwise, it is -1.
 199      May affect compilation of return insn or of function epilogue.  */
200   int args_size;
201 
 202   /* # bytes the prologue should push and pretend that the caller pushed them.
 203      The prologue must do this, but only if parms can be passed in
 204      registers.  */
205   int pretend_args_size;
206 
 207   /* # of bytes of outgoing arguments.  If ACCUMULATE_OUTGOING_ARGS is
 208      defined, the needed space is pushed by the prologue.  */
209   int outgoing_args_size;
210 
 211   /* This is the offset from the arg pointer to the place where the first
 212      anonymous arg can be found, if there is one.  */
213   rtx arg_offset_rtx;
214 
 215   /* Quantities of various kinds of registers
 216      used for the current function's args.  */
217   CUMULATIVE_ARGS args_info;
218 
 219   /* If nonzero, an RTL expression for the location at which the current
 220      function returns its result.  If the current function returns its
 221      result in a register, current_function_return_rtx will always be
 222      the hard register containing the result.  */
223   rtx return_rtx;
224 
 225   /* The arg pointer hard register, or the pseudo into which it was copied.  */
226   rtx internal_arg_pointer;
227 
 228   /* Opaque pointer used by get_hard_reg_initial_val and
 229      has_hard_reg_initial_val (see integrate.[hc]).  */
230   struct initial_value_struct *hard_reg_initial_vals;
231 
 232   /* List (chain of EXPR_LIST) of labels heading the current handlers for
 233      nonlocal gotos.  */
234   rtx x_nonlocal_goto_handler_labels;
235 
 236   /* Label that will go on function epilogue.
 237      Jumping to this label serves as a "return" instruction
 238      on machines which require execution of the epilogue on all returns.  */
239   rtx x_return_label;
240 
 241   /* Label that will go on the end of function epilogue.
 242      Jumping to this label serves as a "naked return" instruction
 243      on machines which require execution of the epilogue on all returns.  */
244   rtx x_naked_return_label;
245 
 246   /* List (chain of EXPR_LISTs) of all stack slots in this function.
 247      Made for the sake of unshare_all_rtl.  */
248   rtx x_stack_slot_list;
249 
 250   /* Place after which to insert the tail_recursion_label if we need one.  */
251   rtx x_tail_recursion_reentry;
252 
 253   /* Location at which to save the argument pointer if it will need to be
 254      referenced.  There are two cases where this is done: if nonlocal gotos
 255      exist, or if vars stored at an offset from the argument pointer will be
 256      needed by inner routines.  */
257   rtx x_arg_pointer_save_area;
258 
 259   /* Offset to end of allocated area of stack frame.
 260      If stack grows down, this is the address of the last stack slot allocated.
 261      If stack grows up, this is the address for the next slot.  */
262   HOST_WIDE_INT x_frame_offset;
263 
 264   /* A PARM_DECL that should contain the static chain for this function.
 265      It will be initialized at the beginning of the function.  */
266   tree static_chain_decl;
267 
 268   /* An expression that contains the non-local goto save area.  The first
 269      word is the saved frame pointer and the second is the saved stack 
 270      pointer.  */
271   tree nonlocal_goto_save_area;
272 
 273   /* Insn after which register parms and SAVE_EXPRs are born, if nonopt.  */
274   rtx x_parm_birth_insn;
275 
 276   /* List of all used temporaries allocated, by level.  */
277   struct varray_head_tag * GTY((param_is (struct temp_slot))) x_used_temp_slots;
278 
 279   /* List of available temp slots.  */
280   struct temp_slot *x_avail_temp_slots;
281 
 282   /* Current nesting level for temporaries.  */
283   int x_temp_slot_level;
284 
 285   /* This slot is initialized as 0 and is added to
 286      during the nested function.  */
287   struct var_refs_queue *fixup_var_refs_queue;
288 
 289   /* For integrate.c.  */
290   int inlinable;
291   int no_debugging_symbols;
292   rtvec original_arg_vector;
293   tree original_decl_initial;
294 
 295   /* Highest label number in current function.  */
296   int inl_max_label_num;
297 
 298   /* Function sequence number for profiling, debugging, etc.  */
299   int funcdef_no;
300 
 301   /* For flow.c.  */
302 
 303   /* Highest loop depth seen so far in loop analysis.  Used in flow.c
 304      for the "failure strategy" when doing liveness analysis starting
 305      with non-empty initial sets.  */
306   int max_loop_depth;
307 
 308   /* For md files.  */
309 
 310   /* tm.h can use this to store whatever it likes.  */
311   struct machine_function * GTY ((maybe_undef)) machine;
 312   /* The largest alignment of slot allocated on the stack.  */
313   unsigned int stack_alignment_needed;
 314   /* Preferred alignment of the end of stack frame.  */
315   unsigned int preferred_stack_boundary;
 316   /* Set when the call to function itself has been emit.  */
317   bool recursive_call_emit;
 318   /* Set when the tail call has been produced.  */
319   bool tail_call_emit;
320 
 321   /* Language-specific code can use this to store whatever it likes.  */
322   struct language_function * language;
323 
 324   /* For reorg.  */
325 
 326   /* If some insns can be deferred to the delay slots of the epilogue, the
 327      delay list for them is recorded here.  */
328   rtx epilogue_delay_list;
329 
 330   /* How commonly executed the function is.  Initialized during branch
 331      probabilities pass.  */
332   enum function_frequency {
 333     /* This function most likely won't be executed at all.
 334        (set only when profile feedback is available).  */
335     FUNCTION_FREQUENCY_UNLIKELY_EXECUTED,
 336     /* The default value.  */
337     FUNCTION_FREQUENCY_NORMAL,
 338     /* Optimize this function hard
 339        (set only when profile feedback is available).  */
340     FUNCTION_FREQUENCY_HOT
341   } function_frequency;
342 
 343   /* Maximal number of entities in the single jumptable.  Used to estimate
 344      final flowgraph size.  */
345   int max_jumptable_ents;
346 
 347   /* UIDs for LABEL_DECLs.  */
348   int last_label_uid;
349 
 350   /* Line number of the end of the function.  */
351   location_t function_end_locus;
352 
 353   /* Array mapping insn uids to blocks.  */
354   struct varray_head_tag *ib_boundaries_block;
355 
 356   /* The variables unexpanded so far.  */
357   tree unexpanded_var_list;
358 
 359   /* Assembly labels for the hot and cold text sections, to
 360      be used by debugger functions for determining the size of text
 361      sections.  */
362 
363   const char *hot_section_label;
364   const char *cold_section_label;
365   const char *hot_section_end_label;
366   const char *cold_section_end_label;
367 
 368   /* String to be used for name of cold text sections, via
 369      targetm.asm_out.named_section.  */
370 
371   const char *unlikely_text_section_name;
372 
 373   /* A variable living at the top of the frame that holds a known value.
 374      Used for detecting stack clobbers.  */
375   tree stack_protect_guard;
376 
 377   /* Collected bit flags.  */
378 
 379   /* Nonzero if function being compiled needs to be given an address
 380      where the value should be stored.  */
381   unsigned int returns_struct : 1;
382 
 383   /* Nonzero if function being compiled needs to
 384      return the address of where it has put a structure value.  */
385   unsigned int returns_pcc_struct : 1;
386 
 387   /* Nonzero if the current function returns a pointer type.  */
388   unsigned int returns_pointer : 1;
389 
 390   /* Nonzero if function being compiled can call setjmp.  */
391   unsigned int calls_setjmp : 1;
392 
 393   /* Nonzero if function being compiled can call alloca,
 394      either as a subroutine or builtin.  */
395   unsigned int calls_alloca : 1;
396 
 397   /* Nonzero if function being compiled called builtin_return_addr or
 398      builtin_frame_address with non-zero count.  */
399   unsigned int accesses_prior_frames : 1;
400 
 401   /* Nonzero if the function calls __builtin_eh_return.  */
402   unsigned int calls_eh_return : 1;
403 
 404   /* Nonzero if function being compiled receives nonlocal gotos
 405      from nested functions.  */
406   unsigned int has_nonlocal_label : 1;
407 
 408   /* Nonzero if function being compiled has nonlocal gotos to parent
 409      function.  */
410   unsigned int has_nonlocal_goto : 1;
411 
 412   /* Nonzero if the current function is a thunk, i.e., a lightweight
 413      function implemented by the output_mi_thunk hook) that just
 414      adjusts one of its arguments and forwards to another
 415      function.  */
416   unsigned int is_thunk : 1;
417 
 418   /* This bit is used by the exception handling logic.  It is set if all
 419      calls (if any) are sibling calls.  Such functions do not have to
 420      have EH tables generated, as they cannot throw.  A call to such a
 421      function, however, should be treated as throwing if any of its callees
 422      can throw.  */
423   unsigned int all_throwers_are_sibcalls : 1;
424 
 425   /* Nonzero if profiling code should be generated.  */
426   unsigned int profile : 1;
427 
 428   /* Nonzero if stack limit checking should be enabled in the current
 429      function.  */
430   unsigned int limit_stack : 1;
431 
 432   /* Nonzero if current function uses stdarg.h or equivalent.  */
433   unsigned int stdarg : 1;
434 
 435   /* Nonzero if the back-end should not keep track of expressions that
 436      determine the size of variable-sized objects.  Normally, such
 437      expressions are saved away, and then expanded when the next
 438      function is started.  For example, if a parameter has a
 439      variable-sized type, then the size of the parameter is computed
 440      when the function body is entered.  However, some front-ends do
 441      not desire this behavior.  */
442   unsigned int x_dont_save_pending_sizes_p : 1;
443 
 444   /* Nonzero if the current function uses the constant pool.  */
445   unsigned int uses_const_pool : 1;
446 
 447   /* Nonzero if the current function uses pic_offset_table_rtx.  */
448   unsigned int uses_pic_offset_table : 1;
449 
 450   /* Nonzero if the current function needs an lsda for exception handling.  */
451   unsigned int uses_eh_lsda : 1;
452 
 453   /* Nonzero if code to initialize arg_pointer_save_area has been emitted.  */
454   unsigned int arg_pointer_save_area_init : 1;
455 
 456   /* Number of units of general registers that need saving in stdarg
 457      function.  What unit is depends on the backend, either it is number
 458      of bytes, or it can be number of registers.  */
459   unsigned int va_list_gpr_size : 8;
460 
 461   /* Number of units of floating point registers that need saving in stdarg
 462      function.  */
463   unsigned int va_list_fpr_size : 8;
464 };


リンク元

特に記載のない限り、コミュニティのコンテンツはCC-BY-SAライセンスの下で利用可能です。