aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-05-12 16:05:28 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2009-05-12 14:05:28 +0000
commit02f0b13a1fa332defa9a828bfc022b45a1c9264c (patch)
tree63fd58b98168fb3c755ec6145a978b20b41a8e2a /gcc/tree-inline.h
parentecb7f6de298a08fab4da4fcc98b6a4a971975a2f (diff)
downloadgcc-02f0b13a1fa332defa9a828bfc022b45a1c9264c.zip
gcc-02f0b13a1fa332defa9a828bfc022b45a1c9264c.tar.gz
gcc-02f0b13a1fa332defa9a828bfc022b45a1c9264c.tar.bz2
loop-36.c: Reduce amount of iterations to 2 so unrolling still happens.
* gcc.dg/tree-ssa/loop-36.c: Reduce amount of iterations to 2 so unrolling still happens. * gcc.dg/ipa/ipacost-1.c: Prevent inlining * gcc.dg/ipa/ipacost-2.c: Likewise. * gcc.dg/vect/slp-3.c: Loop is no longer unrolled. * tree-inline.c (estimate_operator_cost): Add operands; when division happens by constant, it is cheap. (estimate_num_insns): Loads and stores are not having cost of 0; EH magic stuff is cheap; when computing runtime cost of switch, use log2 base of amount of its cases; builtin_expect has cost of 0; compute cost for moving return value of call. (init_inline_once): Initialize time_based flags. * tree-inline.h (eni_weights_d): Add time_based flag. From-SVN: r147436
Diffstat (limited to 'gcc/tree-inline.h')
-rw-r--r--gcc/tree-inline.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h
index 1214c95..37e60bf 100644
--- a/gcc/tree-inline.h
+++ b/gcc/tree-inline.h
@@ -130,6 +130,11 @@ typedef struct eni_weights_d
/* Cost for omp construct. */
unsigned omp_cost;
+
+ /* True when time of statemnt should be estimated. Thus i.e
+ cost of switch statement is logarithmic rather than linear in number
+ of cases. */
+ bool time_based;
} eni_weights;
/* Weights that estimate_num_insns uses for heuristics in inlining. */