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
2e7fd867
Commit
2e7fd867
authored
Nov 28, 2019
by
Jan Hubicka
Committed by
Jan Hubicka
Nov 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ipa-cp.c (update_profiling_info): Fix scaling.
From-SVN: r278808
parent
68578d6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
gcc/ChangeLog
+4
-0
gcc/ipa-cp.c
+8
-2
No files found.
gcc/ChangeLog
View file @
2e7fd867
2019-11-28 Jan Hubicka <hubicka@ucw.cz>
* ipa-cp.c (update_profiling_info): Fix scaling.
2019-11-28 Richard Biener <rguenther@suse.de>
2019-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/92645
PR tree-optimization/92645
gcc/ipa-cp.c
View file @
2e7fd867
...
@@ -4091,6 +4091,7 @@ update_profiling_info (struct cgraph_node *orig_node,
...
@@ -4091,6 +4091,7 @@ update_profiling_info (struct cgraph_node *orig_node,
struct
caller_statistics
stats
;
struct
caller_statistics
stats
;
profile_count
new_sum
,
orig_sum
;
profile_count
new_sum
,
orig_sum
;
profile_count
remainder
,
orig_node_count
=
orig_node
->
count
;
profile_count
remainder
,
orig_node_count
=
orig_node
->
count
;
profile_count
orig_new_node_count
=
new_node
->
count
;
if
(
!
(
orig_node_count
.
ipa
()
>
profile_count
::
zero
()))
if
(
!
(
orig_node_count
.
ipa
()
>
profile_count
::
zero
()))
return
;
return
;
...
@@ -4128,15 +4129,20 @@ update_profiling_info (struct cgraph_node *orig_node,
...
@@ -4128,15 +4129,20 @@ update_profiling_info (struct cgraph_node *orig_node,
remainder
=
orig_node_count
.
combine_with_ipa_count
(
orig_node_count
.
ipa
()
remainder
=
orig_node_count
.
combine_with_ipa_count
(
orig_node_count
.
ipa
()
-
new_sum
.
ipa
());
-
new_sum
.
ipa
());
new_sum
=
orig_node_count
.
combine_with_ipa_count
(
new_sum
);
new_sum
=
orig_node_count
.
combine_with_ipa_count
(
new_sum
);
new_node
->
count
=
new_sum
;
orig_node
->
count
=
remainder
;
orig_node
->
count
=
remainder
;
profile_count
::
adjust_for_ipa_scaling
(
&
new_sum
,
&
orig_node_count
);
profile_count
::
adjust_for_ipa_scaling
(
&
new_sum
,
&
orig_n
ew_n
ode_count
);
for
(
cs
=
new_node
->
callees
;
cs
;
cs
=
cs
->
next_callee
)
for
(
cs
=
new_node
->
callees
;
cs
;
cs
=
cs
->
next_callee
)
cs
->
count
=
cs
->
count
.
apply_scale
(
new_sum
,
orig_node_count
);
cs
->
count
=
cs
->
count
.
apply_scale
(
new_sum
,
orig_new_node_count
);
for
(
cs
=
new_node
->
indirect_calls
;
cs
;
cs
=
cs
->
next_callee
)
cs
->
count
=
cs
->
count
.
apply_scale
(
new_sum
,
orig_new_node_count
);
profile_count
::
adjust_for_ipa_scaling
(
&
remainder
,
&
orig_node_count
);
profile_count
::
adjust_for_ipa_scaling
(
&
remainder
,
&
orig_node_count
);
for
(
cs
=
orig_node
->
callees
;
cs
;
cs
=
cs
->
next_callee
)
for
(
cs
=
orig_node
->
callees
;
cs
;
cs
=
cs
->
next_callee
)
cs
->
count
=
cs
->
count
.
apply_scale
(
remainder
,
orig_node_count
);
cs
->
count
=
cs
->
count
.
apply_scale
(
remainder
,
orig_node_count
);
for
(
cs
=
orig_node
->
indirect_calls
;
cs
;
cs
=
cs
->
next_callee
)
cs
->
count
=
cs
->
count
.
apply_scale
(
remainder
,
orig_node_count
);
if
(
dump_file
)
if
(
dump_file
)
dump_profile_updates
(
orig_node
,
new_node
);
dump_profile_updates
(
orig_node
,
new_node
);
...
...
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