This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)
- From: Jeff Law <law at redhat dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>, Richard Biener <richard dot guenther at gmail dot com>
- Cc: David Malcolm <dmalcolm at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Andrew MacLeod <amacleod at redhat dot com>
- Date: Wed, 06 Nov 2013 13:46:57 -0700
- Subject: Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)
- Authentication-results: sourceware.org; auth=none
- References: <5271CBF9 dot 2070005 at redhat dot com> <1383236801-13234-1-git-send-email-dmalcolm at redhat dot com> <527960A8 dot 7030107 at redhat dot com> <CAFiYyc2okBUaSpm61XkeNv04ps4oofRcqu5G0yFmYhAs6FYzqg at mail dot gmail dot com> <527A21DB dot 301 at codesourcery dot com>
On 11/06/13 04:02, Bernd Schmidt wrote:
I think Andrew outlined much of this at the Cauldron. I'd strongly
recommend reviewing the talk/slides. My personal favorite is the type
checking and everything that implies. For example, most/all of the tree
checking crap just goes away as you'll almost always know what kind of
tree you're working with. Checking becomes limited to locations where
we we have to do conversions. It becomes a lot harder to mess something up.
On 11/06/2013 10:31 AM, Richard Biener wrote:
We decided to move to C++. As part of a later discussion we decided
to go with a single general dynamic-casting style, mimicing the "real"
C++ variant which is dynamic_cast < ... >. Which resulted in
So yes, we've decided to go C++ so we have to live with certain
uglinesses of that decisions (and maybe over time those uglinesses
will fade away and we get used to it and like it).
Thus, there isn't another option besides using the is-a.h machinery
and enabling and using RTTI. Sticking to C for gimple doesn't seem
to be consistent with the decision to move to C++.
Oh, I'm not saying I'm a big fan of as_a / is_a or C++ in general
as it plays out right now. But well, we've had the discussion and
had a decision.
Maybe we need to revisit it? As one of those who were not in favour of
the C++ move, can I ask you guys to step back for a moment and think
about - what do all of these changes buy us, exactly? Imagine the state
at the end, where everything is converted and supposedly the temporary
ugliness is gone, what have we gained over the code as it is now?
I disagree. This effort is meant to restructure GCC so that we can
continue to improve it without going insane.
I still think all this effort is misdirected and distracts us from
making changes that improve gcc for its users.
In many respects it's similar to the tree-ssa work we undertook 10+
years ago and to some degree it's cleaning up things we decided not to
deal with at that time -- namely reusing trees in gimple/ssa.