comparison gcc/basic-block.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 /* Define control flow data structures for the CFG. 1 /* Define control flow data structures for the CFG.
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
145 /* The index of this block. */ 145 /* The index of this block. */
146 int index; 146 int index;
147 147
148 /* Expected number of executions: calculated in profile.c. */ 148 /* Expected number of executions: calculated in profile.c. */
149 profile_count count; 149 profile_count count;
150
151 /* Expected frequency. Normalized to be in range 0 to BB_FREQ_MAX. */
152 int frequency;
153 150
154 /* The discriminator for this block. The discriminator distinguishes 151 /* The discriminator for this block. The discriminator distinguishes
155 among several basic blocks that share a common locus, allowing for 152 among several basic blocks that share a common locus, allowing for
156 more accurate sample-based profiling. */ 153 more accurate sample-based profiling. */
157 int discriminator; 154 int discriminator;
299 /* BB is assumed to contain conditional jump. Return the branch edge. */ 296 /* BB is assumed to contain conditional jump. Return the branch edge. */
300 #define BRANCH_EDGE(bb) (EDGE_SUCC ((bb), 0)->flags & EDGE_FALLTHRU \ 297 #define BRANCH_EDGE(bb) (EDGE_SUCC ((bb), 0)->flags & EDGE_FALLTHRU \
301 ? EDGE_SUCC ((bb), 1) : EDGE_SUCC ((bb), 0)) 298 ? EDGE_SUCC ((bb), 1) : EDGE_SUCC ((bb), 0))
302 299
303 /* Return expected execution frequency of the edge E. */ 300 /* Return expected execution frequency of the edge E. */
304 #define EDGE_FREQUENCY(e) e->probability.apply (e->src->frequency) 301 #define EDGE_FREQUENCY(e) e->count ().to_frequency (cfun)
305 302
306 /* Compute a scale factor (or probability) suitable for scaling of 303 /* Compute a scale factor (or probability) suitable for scaling of
307 gcov_type values via apply_probability() and apply_scale(). */ 304 gcov_type values via apply_probability() and apply_scale(). */
308 #define GCOV_COMPUTE_SCALE(num,den) \ 305 #define GCOV_COMPUTE_SCALE(num,den) \
309 ((den) ? RDIV ((num) * REG_BR_PROB_BASE, (den)) : REG_BR_PROB_BASE) 306 ((den) ? RDIV ((num) * REG_BR_PROB_BASE, (den)) : REG_BR_PROB_BASE)
507 #define CLEANUP_THREADING 8 /* Do jump threading. */ 504 #define CLEANUP_THREADING 8 /* Do jump threading. */
508 #define CLEANUP_NO_INSN_DEL 16 /* Do not try to delete trivially dead 505 #define CLEANUP_NO_INSN_DEL 16 /* Do not try to delete trivially dead
509 insns. */ 506 insns. */
510 #define CLEANUP_CFGLAYOUT 32 /* Do cleanup in cfglayout mode. */ 507 #define CLEANUP_CFGLAYOUT 32 /* Do cleanup in cfglayout mode. */
511 #define CLEANUP_CFG_CHANGED 64 /* The caller changed the CFG. */ 508 #define CLEANUP_CFG_CHANGED 64 /* The caller changed the CFG. */
509 #define CLEANUP_NO_PARTITIONING 128 /* Do not try to fix partitions. */
512 510
513 /* Return true if BB is in a transaction. */ 511 /* Return true if BB is in a transaction. */
514 512
515 static inline bool 513 static inline bool
516 bb_in_transaction (basic_block bb) 514 bb_in_transaction (basic_block bb)