[PATCH] D104365: [FuncSpec] Enabling specializing direct constant

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 21 00:49:54 PDT 2021


SjoerdMeijer added a comment.

Let me explain why I am a bit pushing back at this: I would like to see function specialisation enabled by default one day, and therefore I am interested to know how much more difficult that is going to be when we also specialise on integer constants. In previous comments you mentioned:

> So the amount of new specialized functions wouldn't be much larger.

If we are going to specialise on integers, we are going to specialise more, even though the cost-model indeed takes the number of specialised into account. I don't think there's another way of looking at it.

> The results show that this change wouldn't increase the compile-time with significant change.

I don't think we can draw this conclusion because we know that for SPEC function pointers are important.  To understand what is happening, I would like to know how many functions were specialised on integer constants. Only then we can say something about this. And in order to get these numbers, it is probably convenient:

- to split the statistics up and have a counter for the constant globals and another for the constant integers,
- have command line options to toggle on/off this different behaviour.

Regardless whether this triggers or not in SPEC, I also think we need a few more data points to draw any conclusions. Because it is easy and relevant, I would suggest at least a bootstrap build and sqlite.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104365/new/

https://reviews.llvm.org/D104365



More information about the llvm-commits mailing list