On Wed, Apr 11, 2012 at 3:35 AM, Lawrence Crowl <cr...@google.com> wrote:
> On 4/10/12, Richard Guenther <richard.guent...@gmail.com> wrote:
>> On Apr 9, 2012 Lawrence Crowl <cr...@google.com> wrote:
>> > On 4/9/12, Jakub Jelinek <ja...@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.

We already use C++ iterator "style" and there are nearly no indirect
function calls involved (unless you use the walk_*_with_* routines,
which I detest, and you get the same when you use C++ foreach ()
style).

Richard.

>
> --
> Lawrence Crowl

Reply via email to