comparison gcc/cfgloop.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 /* Natural loop functions 1 /* Natural loop functions
2 Copyright (C) 1987-2017 Free Software Foundation, Inc. 2 Copyright (C) 1987-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
218 /* True if we should try harder to vectorize this loop. */ 218 /* True if we should try harder to vectorize this loop. */
219 unsigned force_vectorize : 1; 219 unsigned force_vectorize : 1;
220 220
221 /* True if the loop is part of an oacc kernels region. */ 221 /* True if the loop is part of an oacc kernels region. */
222 unsigned in_oacc_kernels_region : 1; 222 unsigned in_oacc_kernels_region : 1;
223
224 /* The number of times to unroll the loop. 0 means no information given,
225 just do what we always do. A value of 1 means do not unroll the loop.
226 A value of USHRT_MAX means unroll with no specific unrolling factor.
227 Other values means unroll with the given unrolling factor. */
228 unsigned short unroll;
223 229
224 /* For SIMD loops, this is a unique identifier of the loop, referenced 230 /* For SIMD loops, this is a unique identifier of the loop, referenced
225 by IFN_GOMP_SIMD_VF, IFN_GOMP_SIMD_LANE and IFN_GOMP_SIMD_LAST_LANE 231 by IFN_GOMP_SIMD_VF, IFN_GOMP_SIMD_LANE and IFN_GOMP_SIMD_LAST_LANE
226 builtins. */ 232 builtins. */
227 tree simduid; 233 tree simduid;
334 void record_loop_exits (void); 340 void record_loop_exits (void);
335 void rescan_loop_exit (edge, bool, bool); 341 void rescan_loop_exit (edge, bool, bool);
336 void sort_sibling_loops (function *); 342 void sort_sibling_loops (function *);
337 343
338 /* Loop data structure manipulation/querying. */ 344 /* Loop data structure manipulation/querying. */
339 extern void flow_loop_tree_node_add (struct loop *, struct loop *); 345 extern void flow_loop_tree_node_add (struct loop *, struct loop *,
346 struct loop * = NULL);
340 extern void flow_loop_tree_node_remove (struct loop *); 347 extern void flow_loop_tree_node_remove (struct loop *);
341 extern bool flow_loop_nested_p (const struct loop *, const struct loop *); 348 extern bool flow_loop_nested_p (const struct loop *, const struct loop *);
342 extern bool flow_bb_inside_loop_p (const struct loop *, const_basic_block); 349 extern bool flow_bb_inside_loop_p (const struct loop *, const_basic_block);
343 extern struct loop * find_common_loop (struct loop *, struct loop *); 350 extern struct loop * find_common_loop (struct loop *, struct loop *);
344 struct loop *superloop_at_depth (struct loop *, unsigned); 351 struct loop *superloop_at_depth (struct loop *, unsigned);
348 extern unsigned get_loop_level (const struct loop *); 355 extern unsigned get_loop_level (const struct loop *);
349 extern bool loop_exit_edge_p (const struct loop *, const_edge); 356 extern bool loop_exit_edge_p (const struct loop *, const_edge);
350 extern bool loop_exits_to_bb_p (struct loop *, basic_block); 357 extern bool loop_exits_to_bb_p (struct loop *, basic_block);
351 extern bool loop_exits_from_bb_p (struct loop *, basic_block); 358 extern bool loop_exits_from_bb_p (struct loop *, basic_block);
352 extern void mark_loop_exit_edges (void); 359 extern void mark_loop_exit_edges (void);
353 extern location_t get_loop_location (struct loop *loop); 360 extern dump_user_location_t get_loop_location (struct loop *loop);
354 361
355 /* Loops & cfg manipulation. */ 362 /* Loops & cfg manipulation. */
356 extern basic_block *get_loop_body (const struct loop *); 363 extern basic_block *get_loop_body (const struct loop *);
357 extern unsigned get_loop_body_with_size (const struct loop *, basic_block *, 364 extern unsigned get_loop_body_with_size (const struct loop *, basic_block *,
358 unsigned); 365 unsigned);
379 extern void verify_loop_structure (void); 386 extern void verify_loop_structure (void);
380 387
381 /* Loop analysis. */ 388 /* Loop analysis. */
382 extern bool just_once_each_iteration_p (const struct loop *, const_basic_block); 389 extern bool just_once_each_iteration_p (const struct loop *, const_basic_block);
383 gcov_type expected_loop_iterations_unbounded (const struct loop *, 390 gcov_type expected_loop_iterations_unbounded (const struct loop *,
384 bool *read_profile_p = NULL); 391 bool *read_profile_p = NULL, bool by_profile_only = false);
385 extern unsigned expected_loop_iterations (struct loop *); 392 extern unsigned expected_loop_iterations (struct loop *);
386 extern rtx doloop_condition_get (rtx_insn *); 393 extern rtx doloop_condition_get (rtx_insn *);
387 394
388 void mark_loop_for_removal (loop_p); 395 void mark_loop_for_removal (loop_p);
389 396
758 for (loop_iterator li(cfun, &(LOOP), FLAGS); \ 765 for (loop_iterator li(cfun, &(LOOP), FLAGS); \
759 (LOOP); \ 766 (LOOP); \
760 (LOOP) = li.next ()) 767 (LOOP) = li.next ())
761 768
762 #define FOR_EACH_LOOP_FN(FN, LOOP, FLAGS) \ 769 #define FOR_EACH_LOOP_FN(FN, LOOP, FLAGS) \
763 for (loop_iterator li(fn, &(LOOP), FLAGS); \ 770 for (loop_iterator li(FN, &(LOOP), FLAGS); \
764 (LOOP); \ 771 (LOOP); \
765 (LOOP) = li.next ()) 772 (LOOP) = li.next ())
766 773
767 /* The properties of the target. */ 774 /* The properties of the target. */
768 struct target_cfgloop { 775 struct target_cfgloop {