This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] NFC: split deserialization into multiple source files
ClosedPublic

Authored by antiagainst on Jan 9 2021, 6:08 AM.

Details

Summary

This avoids large source files and gives a better structure. It also
allows leveraging compilation parallelism.

Diff Detail

Event Timeline

antiagainst created this revision.Jan 9 2021, 6:08 AM
antiagainst requested review of this revision.Jan 9 2021, 6:08 AM
ergawy added a subscriber: ergawy.Jan 10 2021, 10:50 PM

Nice! Actually last Friday I was looking into seeing whether doing the same would be beneficial for SPIRVOps.cpp. Using -ftime-trace shows that it takes ~19 seconds to cleanly compile it. Most of that time ~13 is spent in the backend. So I guess parallelized compilation can be beneficial here as well. If you aren't planning to do that already, I can split it.

Nice! Actually last Friday I was looking into seeing whether doing the same would be beneficial for SPIRVOps.cpp. Using -ftime-trace shows that it takes ~19 seconds to cleanly compile it. Most of that time ~13 is spent in the backend. So I guess parallelized compilation can be beneficial here as well. If you aren't planning to do that already, I can split it.

Yup! That is another large file that should be split into multiple smaller ones. Please feel free to take on it if you are interested! We can split according op categories, like we do with those td files. Or some other scheme that you'd like. Thanks a lot! :D

mravishankar accepted this revision.Jan 11 2021, 10:43 AM
This revision is now accepted and ready to land.Jan 11 2021, 10:43 AM
This revision was landed with ongoing or failed builds.Jan 12 2021, 8:22 AM
This revision was automatically updated to reflect the committed changes.
mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp