This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Remove the use of FilterTypes for template metaprogramming
ClosedPublic

Authored by rriddle on Apr 7 2022, 9:52 PM.

Details

Summary

This technique results in an explosion in compile time, resulting from a
huge number of std::tuple/concat instatiations. This technique is replaced
by simpler metaprogramming and results in a signficant reduction in
compile time. A local debug/asan build saw a 4x speed up in the processing
of ArithmeticOps.h.inc, and given the nature of this change every dialect
should see similar reductions in compile time.

Diff Detail

Event Timeline

rriddle created this revision.Apr 7 2022, 9:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2022, 9:52 PM
rriddle requested review of this revision.Apr 7 2022, 9:52 PM
silvas accepted this revision.Apr 8 2022, 10:46 AM

Nice :)

This revision is now accepted and ready to land.Apr 8 2022, 10:46 AM

Nice :)

Could you perhaps report the before and after on the case you mentioned was bad here to verify this fixes it? (seems likely but would be good to have verification)

Tested on head and this sped up the compile time of InitAllDialects.h by slightly over 2x (in my debug/asan build), so committing. I'm going to try a few other tweaks to speed things up, but this is fairly significant.