Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
d621a5fb
Commit
d621a5fb
authored
Oct 23, 2011
by
Jan Hubicka
Committed by
Jan Hubicka
Oct 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ipa-inline.c (estimate_badness): Scale up and handle overflows.
From-SVN: r180336
parent
fe646a69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
gcc/ChangeLog
+4
-0
gcc/ipa-inline.c
+10
-4
No files found.
gcc/ChangeLog
View file @
d621a5fb
2011
-
10
-
23
Jan
Hubicka
<
jh
@suse
.
cz
>
*
ipa
-
inline
.
c
(
estimate_badness
)
:
Scale
up
and
handle
overflows
.
2011
-
10
-
23
Uros
Bizjak
<
ubizjak
@gmail
.
com
>
PR
target
/
50788
gcc/ipa-inline.c
View file @
d621a5fb
...
...
@@ -822,8 +822,10 @@ edge_badness (struct cgraph_edge *edge, bool dump)
/* Result must be integer in range 0...INT_MAX.
Set the base of fixed point calculation so we don't lose much of
precision for small bandesses (those are interesting) yet we don't
overflow for growths that are still in interesting range. */
badness
=
((
gcov_type
)
growth
)
*
(
1
<<
18
);
overflow for growths that are still in interesting range.
Fixed point arithmetic with point at 8th bit. */
badness
=
((
gcov_type
)
growth
)
*
(
1
<<
(
19
+
8
));
badness
=
(
badness
+
div
/
2
)
/
div
;
/* Overall growth of inlining all calls of function matters: we want to
...
...
@@ -838,10 +840,14 @@ edge_badness (struct cgraph_edge *edge, bool dump)
We might mix the valud into the fraction by taking into account
relative growth of the unit, but for now just add the number
into resulting fraction. */
if
(
badness
>
INT_MAX
/
2
)
{
badness
=
INT_MAX
/
2
;
if
(
dump
)
fprintf
(
dump_file
,
"Badness overflow
\n
"
);
}
growth_for_all
=
estimate_growth
(
callee
);
badness
+=
growth_for_all
;
if
(
badness
>
INT_MAX
-
1
)
badness
=
INT_MAX
-
1
;
if
(
dump
)
{
fprintf
(
dump_file
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment