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

Issue 4809083: [lto] Refactor streamer (1/N) (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 9 months ago by Diego Novillo
Modified:
12 years, 8 months ago
Reviewers:
howarth, richard.guenther, jakub
CC:
rguenther_suse.de, jh_suse.cz, matz_suse.de, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4613 lines, -3960 lines) Patch
M gcc/ChangeLog View 1 chunk +219 lines, -0 lines 0 comments Download
M gcc/Makefile.in View 11 chunks +52 lines, -10 lines 0 comments Download
A gcc/data-streamer.h View 1 chunk +355 lines, -0 lines 0 comments Download
A gcc/data-streamer.c View 1 chunk +111 lines, -0 lines 0 comments Download
A gcc/data-streamer-in.c View 1 chunk +152 lines, -0 lines 0 comments Download
A gcc/data-streamer-out.c View 1 chunk +207 lines, -0 lines 0 comments Download
A gcc/gimple-streamer.h View 1 chunk +36 lines, -0 lines 0 comments Download
A gcc/gimple-streamer-in.c View 1 chunk +333 lines, -0 lines 0 comments Download
A gcc/gimple-streamer-out.c View 1 chunk +213 lines, -0 lines 0 comments Download
M gcc/ipa-inline-analysis.c View 1 chunk +2 lines, -0 lines 0 comments Download
M gcc/ipa-prop.c View 1 chunk +2 lines, -0 lines 0 comments Download
M gcc/ipa-pure-const.c View 1 chunk +2 lines, -0 lines 0 comments Download
M gcc/lto-cgraph.c View 1 chunk +2 lines, -0 lines 0 comments Download
M gcc/lto-section-in.c View 1 chunk +0 lines, -109 lines 0 comments Download
M gcc/lto-section-out.c View 1 chunk +0 lines, -107 lines 0 comments Download
M gcc/lto-streamer.h View 11 chunks +30 lines, -383 lines 0 comments Download
M gcc/lto-streamer.c View 4 chunks +2 lines, -265 lines 0 comments Download
M gcc/lto-streamer-in.c View 13 chunks +14 lines, -1554 lines 0 comments Download
M gcc/lto-streamer-out.c View 4 chunks +166 lines, -1531 lines 0 comments Download
M gcc/lto/ChangeLog View 1 chunk +5 lines, -0 lines 0 comments Download
M gcc/lto/Make-lang.in View 1 chunk +1 line, -1 line 0 comments Download
M gcc/lto/lto.c View 1 chunk +1 line, -0 lines 0 comments Download
A gcc/streamer-hooks.h View 1 chunk +118 lines, -0 lines 0 comments Download
A gcc/streamer-hooks.c View 1 chunk +37 lines, -0 lines 0 comments Download
A gcc/tree-streamer.h View 1 chunk +76 lines, -0 lines 0 comments Download
A gcc/tree-streamer.c View 1 chunk +279 lines, -0 lines 0 comments Download
A gcc/tree-streamer-in.c View 1 chunk +1153 lines, -0 lines 0 comments Download
A gcc/tree-streamer-out.c View 1 chunk +1045 lines, -0 lines 0 comments Download

Messages

Total messages: 11
Diego Novillo
This is the first patch in a series of refactoring patches to cleanup the API ...
12 years, 9 months ago (2011-08-08 14:23:37 UTC) #1
howarth_bromo.med.uc.edu
On Mon, Aug 08, 2011 at 10:23:34AM -0400, Diego Novillo wrote: > > This is ...
12 years, 9 months ago (2011-08-08 14:35:19 UTC) #2
matz_suse.de
Hi, On Mon, 8 Aug 2011, Diego Novillo wrote: > With these patches I'd like ...
12 years, 9 months ago (2011-08-08 14:52:16 UTC) #3
Diego Novillo
On Mon, Aug 8, 2011 at 10:35, Jack Howarth <howarth@bromo.med.uc.edu> wrote: > On Mon, Aug ...
12 years, 9 months ago (2011-08-08 15:14:37 UTC) #4
Diego Novillo
On Mon, Aug 8, 2011 at 10:52, Michael Matz <matz@suse.de> wrote: > Sound. ;) Looking ...
12 years, 9 months ago (2011-08-08 15:16:31 UTC) #5
rguenther_suse.de
On Mon, 8 Aug 2011, Diego Novillo wrote: > On Mon, Aug 8, 2011 at ...
12 years, 9 months ago (2011-08-08 15:17:43 UTC) #6
richard.guenther_gmail.com
On Mon, Aug 8, 2011 at 5:17 PM, Richard Guenther <rguenther@suse.de> wrote: > On Mon, ...
12 years, 8 months ago (2011-08-26 08:24:44 UTC) #7
matz_suse.de
Hi, On Fri, 26 Aug 2011, Richard Guenther wrote: > >> I am going to ...
12 years, 8 months ago (2011-08-26 12:34:30 UTC) #8
Diego Novillo
On 11-08-26 04:24 , Richard Guenther wrote: > This patch caused http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50165 > it seems ...
12 years, 8 months ago (2011-08-26 12:34:49 UTC) #9
jakub_redhat.com
On Fri, Aug 26, 2011 at 02:34:29PM +0200, Michael Matz wrote: > Hi, > > ...
12 years, 8 months ago (2011-08-26 12:44:56 UTC) #10
matz_suse.de
12 years, 8 months ago (2011-08-26 16:04:08 UTC) #11
Hi,

On Fri, 26 Aug 2011, Jakub Jelinek wrote:

> While you are touching it, I think we should also optimize it as in the 
> patch below.  I'm afraid no string length optimization would be able to 
> figure out that it doesn't have to call strlen twice, because the 
> htab_find_slot isn't pure.

Sure.  Regstrapped the below patch and checked in as r178118.


Ciao,
Michael.
-- 
Index: lto-streamer-in.c
===================================================================
--- lto-streamer-in.c   (revision 178117)
+++ lto-streamer-in.c   (revision 178118)
@@ -98,21 +98,22 @@ canon_file_name (const char *string)
 {
   void **slot;
   struct string_slot s_slot;
+  size_t len = strlen (string);
+
   s_slot.s = string;
-  s_slot.len = strlen (string);
+  s_slot.len = len;

   slot = htab_find_slot (file_name_hash_table, &s_slot, INSERT);
   if (*slot == NULL)
     {
-      size_t len;
       char *saved_string;
       struct string_slot *new_slot;

-      len = strlen (string);
       saved_string = (char *) xmalloc (len + 1);
       new_slot = XCNEW (struct string_slot);
-      strcpy (saved_string, string);
+      memcpy (saved_string, string, len + 1);
       new_slot->s = saved_string;
+      new_slot->len = len;
       *slot = new_slot;
       return saved_string;
     }

Sign in to reply to this message.

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