This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Switching to C++ by default in 4.8


On 4/10/12, Richard Guenther <richard.guenther@gmail.com> wrote:
> On Apr 9, 2012 Lawrence Crowl <crowl@google.com> wrote:
> > On 4/9/12, Jakub Jelinek <jakub@redhat.com> wrote:
> > > On Mon, Apr 09, 2012 at 10:55:46AM -0700, Lawrence Crowl wrote:
> > > > A build conversion to C++ is a precondition to any source
> > > > change using C++, though the two could be bundled into
> > > > one patch.  In any event, I agree that the conversion
> > > > needs to provide value. Vectors and hash tables are a good
> > > > early target.
> > >
> > > Hash tables?  Ugh, what is wrong with the hash tables we have
> > > right now in GCC?
> >
> > Lots of boiler plate involving casting to void*.  Some of that
> > boiler plate makes the optimizer less effective.
>
> Optimizers ignore pointer types, so that assertion cannot be true.

The standard says they need not ignore them.

I was thinking more about iterating over the contents.  What in the
current code is an indirect function call inside of a loop becomes
mostly be inline functions in a C++ iterator style.  The loop is now
fully graspable by the optimizer.

-- 
Lawrence Crowl


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]