diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-06 21:08:49 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-06 21:08:49 +0000 |
commit | 3c49142dd6eb3512e06368e828556eaf0687c433 (patch) | |
tree | ffab5c3984b38ea5b36772ada2dc0df12643ad5e /gcc/ipa-inline-analysis.c | |
parent | 153f105a2d99cc762b03a8dac21c0c816c47adbe (diff) | |
download | gcc-3c49142dd6eb3512e06368e828556eaf0687c433.tar.gz |
* ipa-inline-analysis.c (estimate_function_body_sizes,
inline_update_overall_summary): Cap time calculations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193259 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 595cb682a5b..7d89d89aae3 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -2442,6 +2442,8 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early) { time += this_time; size += this_size; + if (time > MAX_TIME * INLINE_TIME_SCALE) + time = MAX_TIME * INLINE_TIME_SCALE; } /* We account everything but the calls. Calls have their own @@ -3323,7 +3325,11 @@ inline_update_overall_summary (struct cgraph_node *node) info->size = 0; info->time = 0; for (i = 0; VEC_iterate (size_time_entry, info->entry, i, e); i++) - info->size += e->size, info->time += e->time; + { + info->size += e->size, info->time += e->time; + if (info->time > MAX_TIME * INLINE_TIME_SCALE) + info->time = MAX_TIME * INLINE_TIME_SCALE; + } estimate_calls_size_and_time (node, &info->size, &info->time, NULL, ~(clause_t)(1 << predicate_false_condition), NULL, NULL, NULL); |