Adds some bookkeeping for collecting the number of specialised functions, and a test.
Thanks for the update! Could you update the description/title, as they seem a bit out-of-sync after the recent changes.
might be good to also have a test to check the stats work as expected?
Would be good to add a comment. Should the type be unsigned?
Not necessarily, but it kind of nicely illustrates the possibilities with those "clean up" passes, the things function specialisation enables.
Let me know what you prefer as I am of course happy to remove them.
Usually we try to avoid having tests depend on different passes, to reduce churn when making changes to unrelated passes. While it is nice other stats improve, it’s independent of checking the function specialisation stats.
Added a test for that in rG29843cbc88f6.
Ok, sure, understood. This is indeed almost an end-to-end test for function specialisation, and it would be good to have that, but it does not necessarily fit here. Will modify this test.