From: eraman@google.com
To: tmsriram@google.com, davidxl@google.com
Cc: gcc-patches@gcc.gnu.org, reply@codereview-hr.appspotmail.com
Subject: Re: [google][4.6] Bug fixes to function reordering linker plugin to handle local and comdat functions. (issue 5851044)
Date: Tue, 20 Mar 2012 19:26:00 -0000 [thread overview]
Message-ID: <20cf305642d7abae8a04bbb1a61b@google.com> (raw)
http://codereview.appspot.com/5851044/diff/1/callgraph.c
File callgraph.c (right):
http://codereview.appspot.com/5851044/diff/1/callgraph.c#newcode513
callgraph.c:513: const int section_priority[] = {0, 3, 4, 2, 1};
Add a comment about section_priority
http://codereview.appspot.com/5851044/diff/1/callgraph.c#newcode571
callgraph.c:571: if (section_priority[kept->section_type]
Add an example that shows why we want to do that
http://codereview.appspot.com/5851044/diff/1/callgraph.c#newcode655
callgraph.c:655: write_out_node (n_it->name, §ion_start[0],
§ion_end[0]);
In write_out_node, why take the function name and do a hash table lookup
to get the section, instead of directly passing Section_id * in the
caller. In all calls to write_out_node, you are in fact getting the name
from the Section_id *.
http://codereview.appspot.com/5851044/diff/1/callgraph.c#newcode674
callgraph.c:674: s_it->processed = 1;
setting processed to 1 is redundant as it is already done in
write_out_node.
http://codereview.appspot.com/5851044/diff/1/callgraph.h
File callgraph.h (right):
http://codereview.appspot.com/5851044/diff/1/callgraph.h#newcode31
callgraph.h:31: void push_mm_ptr (void *ptr);
push_allocated_ptr or save_allocated_ptr would be a better name.
http://codereview.appspot.com/5851044/diff/1/callgraph.h#newcode48
callgraph.h:48: push_mm_ptr (list);
It might be cleaner to create a wrapper around XNEW that calls
push_mm_ptr after XNEW. Similar for malloc as well.
http://codereview.appspot.com/5851044/
next reply other threads:[~2012-03-20 19:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 19:26 eraman [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-22 1:16 tmsriram
2012-03-21 5:07 davidxl
2012-03-21 4:19 tmsriram
2012-03-21 4:18 tmsriram
2012-03-20 19:25 davidxl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20cf305642d7abae8a04bbb1a61b@google.com \
--to=eraman@google.com \
--cc=davidxl@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=reply@codereview-hr.appspotmail.com \
--cc=tmsriram@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).