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: GSoc-2015: Modular GCC (RFC on refactoring)


On 03/17/2015 10:32 PM, Trevor Saunders wrote:

2. Lists, list nodes and list iterators should be objects of distinct
types. In this case, header file function.h gets additional dependency,
because struct rtldata contains insn/expr lists as members; currently
they are pointers, so a forward declaration is sufficient. A possible
workaround is to create an opaque type like it's done with struct
initial_value_struct (at a cost of one additional level of indirection).
Which is better?

given std::forward_list isn't available in c++98 I expect you'll write
your own version of it.  It seems pretty reasonable to me function.h
would depend on the hypothetical header containing that list template,
and presumably more stuff than just rtx_insn_list's could be made to use
it.
Sigh. We could just use a vec then... That would still be better in various ways than chaining things via EXPR_LIST or INSN_LIST.


Jeff


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