Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(53)

Issue 5101042: Preserve callee cgraph edges when callgraph profiles sections are requested.

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by Sriraman
Modified:
13 years, 3 months ago
Reviewers:
davidxl, hubicka
CC:
gcc-patches_gcc.gnu.org
Base URL:
svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6/gcc/
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -2 lines) Patch
M cgraphbuild.c View 1 chunk +8 lines, -0 lines 0 comments Download
M final.c View 1 chunk +3 lines, -2 lines 0 comments Download
A testsuite/g++.dg/tree-prof/callgraph-profiles.C View 1 chunk +29 lines, -0 lines 0 comments Download
M tree-optimize.c View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 5
Sriraman
This patch preserves cgraph callee edges till pass_final if callgraph edge profiles sections are requested. ...
13 years, 3 months ago (2011-09-22 23:01:09 UTC) #1
Sriraman
Forgot to mention the changes: * cgraphbuild.c (remove_cgraph_callee_edges): Preserve callee edges if callgraph profiles are ...
13 years, 3 months ago (2011-09-22 23:11:26 UTC) #2
davidxl
ok for google branches. (Did a little digging -- the remove pass is added because ...
13 years, 3 months ago (2011-09-22 23:24:50 UTC) #3
davidxl
Martin, thanks for the explanation. I knew inliner did a good job of maintaining callgraph ...
13 years, 3 months ago (2011-09-23 16:12:05 UTC) #4
hubicka_ucw.cz
13 years, 3 months ago (2011-09-23 17:28:20 UTC) #5
Hi,

> Martin,
> 
> thanks for the explanation.
> 
> I knew inliner did a good job of maintaining callgraph and profile
> information, but did not know about removing dead edges etc.

This was fixed with introduction of virtual clones, where the edges are still
needed post inlining.  We however do not maintain them longer.
It should not be that hard to do so - we already maintain EH tables on side
of the statements themselves, so one would just hook at the same places as EH
updating is done.
So far it was not neccesary.
> 
> However the situation you described (unwanted edges, post-ipa DCE
> eliminating calls without updating cg etc) won't be a big issue for
> Sri's use case as the edges that needed to be written to the note
> section are those with non-zero count -- which means they are 'live'
> and won't be eliminated.
> 
> However, making cg permanent would be even better :) -- there are
> definitely other use cases (post-ipa) of it in the future.

I would not be opposed to that, it just need some work ;)

Honza
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b