Also, the loop was created by defining a generic ROM class that most ISAs would use that didn't do anything, and then including that and "using" it in types.hh. The header file for the generic ROM needed a function to return microops which meant it needed StaticInstPtr, which meant it needed static_inst.hh, which includes isa_traits.hh which causes a loop. I would really love to break the dependence between StaticInstPtr and static_inst.hh, but I haven't been able to do that in the past.
Gabe Gabe Black wrote: > I just fought my way through another recursive include type > situation while adding a microcode ROM to the CPUs. It seems like there > are just to many things that are useful in too many places in a few > header files in each of the ISAs. If you include anything outside of the > ISA in one of those files, you've essentially included it in most of the > rest of the simulator, and at that point a loop is very likely to > develop. I don't know of a good way to solve that problem, but I have a > few ideas on how to at least make it a little better. Some things we > have as ISA defined types at the moment probably don't absolutely need > to be. For instance, all manner of register indexes could probably just > be uint32_t universally with no problems and minimal space overhead. I > don't think there are many instances of that and I don't like the idea > of removing that flexibility from the ISAs, so I'm not very excited > about doing that. The other idea would be to create a cloud of little > header files which all defined exactly one thing. I think in most cases, > things outside the ISA really only need a few types and could include > each one individually without too much trouble. The biggest problem here > is that we'd end up with gobs of little files with way more copyright > information in them than actual code. Does anyone have any suggestions? > > Gabe > _______________________________________________ > m5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/m5-dev > _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
