Skip to content

Conversation

powerjg
Copy link
Contributor

@powerjg powerjg commented Oct 1, 2025

To compile the insts/ files separately from the generated files there was a circular dependence between the generated decoder.hh and sve_macromem.hh that had to be broken. decoder.hh defines the classes SveGatherLoadCpySrcVecMicroop and SveGatherLoadCpySrcVecMicroop which were used with new in the header file. Also, decoder.hh depends on all insts/*.hh files.

To break this dependence, we need to move the constructor implementations into a cc file. However, the classes are template classes so we also need to specify all of the uses of the templates. I believe these are fixed, so they are manually added to sve_macromem.cc.

@powerjg
Copy link
Contributor Author

powerjg commented Oct 1, 2025

@giactra let me know what you think on this. I don't love this solution, but I believe it's the best way to break this circular dependence.

Please review at least semi-carefully. Gemini did (almost) all the work.

(Note: More changes will be coming for circular dependences between arch/arm and arch/dev/arm once I get things to compile...)

To compile the insts/ files separately from the generated files there
was a circular dependence between the generated decoder.hh and
sve_macromem.hh that had to be broken. decoder.hh defines the classes
SveGatherLoadCpySrcVecMicroop and SveGatherLoadCpySrcVecMicroop which
were used with `new` in the header file. Also, decoder.hh depends on all
insts/*.hh files.

To break this dependence, we need to move the constructor implementations into
a cc file. However, the classes are template classes so we also need to
specify all of the uses of the templates. I believe these are fixed, so
they are manually added to sve_macromem.cc.

Signed-off-by: Jason Lowe-Power <jlowepower@google.com>
@powerjg powerjg force-pushed the decouple-insts-decoder-arm branch from ae26c06 to 639b9d5 Compare October 2, 2025 15:17
@erin-le erin-le added the arch-arm The ARM ISA label Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm The ARM ISA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants