This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 5/5] add libcc1
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, tom at tromey dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 24 Oct 2014 08:15:36 +0100
- Subject: Re: [PATCH 5/5] add libcc1
- Authentication-results: sourceware.org; auth=none
- References: <1400254001-12038-1-git-send-email-tromey at redhat dot com> <87oayx4l0x dot fsf at fleche dot redhat dot com> <87bntobp1f dot fsf at fleche dot redhat dot com> <53D9CA7B dot 3040709 at redhat dot com> <5436504B dot 8060902 at redhat dot com> <54385676 dot 4000004 at redhat dot com>
On 10/10/14 22:58, Jeff Law wrote:
> On 10/09/14 03:07, Phil Muldoon wrote:
>>
>> Sorry for taking so long to reply. We've talked, on irc and elsewhere
>> a little (some at the Cauldron too!). I think the consensus is as
>> nobody has explicitly mentioned anything, this is OK to go in?
> Yes, please go ahead and check it in. You'll be the first contact point if something goes wrong :-)
>
> Given the length of time since the original post and now, can you please do sanity bootstrap to make sure nothing's bitrotted before you commit?
I rebased the patch on top of GCC head (from the git repository),
updated the ChangeLogs, etc from two days ago (it takes two days to do
a full rebase, pristine and patched bootstrap and testrun on my poor
laptop ;).
I've built both pristine and patched branches with bootstrap enabled.
I ran both testsuites and used contrib/compare_tests to make sure
everything was as it should be. compare_tests reports everything as
fine. One minor change I found, was due to some ongoing work on
hash_tables. It seems to parameterless constructor call for a new
hash table has been removed. This was trivially fixed with the patch
attached. Even though (to me) it is obvious, what do you think?
Cheers
Phil
--
diff --git a/libcc1/plugin.cc b/libcc1/plugin.cc
index fbb49d3..5cdd19d 100644
--- a/libcc1/plugin.cc
+++ b/libcc1/plugin.cc
@@ -220,13 +220,10 @@ static plugin_context *current_context;
plugin_context::plugin_context (int fd)
: cc1_plugin::connection (fd),
- address_map (),
- preserved (),
- file_names ()
+ address_map (30),
+ preserved (30),
+ file_names (30)
{
- address_map.create (20);
- preserved.create (20);
- file_names.create (20);
}
void
@@ -236,8 +233,8 @@ plugin_context::mark ()
it != address_map.end ();
++it)
{
- ggc_mark ((*it).decl);
- ggc_mark ((*it).address);
+ ggc_mark ((*it)->decl);
+ ggc_mark ((*it)->address);
}
for (hash_table< pointer_hash<tree_node> >::iterator it = preserved.begin ();