On Tue, Dec 03, 2019 at 11:52:13AM -0500, David Malcolm wrote: > > > Our plugin "interface" as such is very broad. > > > > Just to sneak in here I don't like exposing our current plugin "non- > > API" > > more. In fact I'd just build the analyzer into GCC with maybe an > > option to disable its build (in case it is very fat?). > > My aim here is to provide a way for distributors to be able to disable > its build - indeed, for now, for it to be disabled by default, > requiring opting-in. > > My reasoning here is that the analyzer is middle-end code, but isn't as > mature as the rest of the middle-end (but I'm working on getting it > more mature). > > I want some way to label the code as a "technology preview", that > people may want to experiment with, but to set expectations that this > is a lot of new code and there will be bugs - but to make it available > to make it easier for adventurous users to try it out. > > I hope that makes sense. > > I went down the "in-tree plugin" path by seeing the analogy with > frontends, but yes, it would probably be simpler to just build it into > GCC, guarded with a configure-time variable. It's many thousand lines > of non-trivial C++ code, and associated selftests and DejaGnu tests.
I think it is enough to document it as tech preview in the documentation, no need to have it as an in-tree plugin. We have lots of options that had such a state (perhaps undeclared) over the years, I'd consider -fvtable-verify= to be such an option, or in the past e.g. -fipa-matrix-reorg or -fipa-struct-reorg. And 2.5% code growth isn't that bad. So, as long as the option isn't enabled by default, I think we'd be fine. Jakub