[cfe-dev] [RFC] automatic variable initialization

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 27 10:14:46 PST 2018


On Tue, Nov 27, 2018 at 1:24 AM Andrea Bocci <andrea.bocci at cern.ch> wrote:

> On Sat, 17 Nov 2018 at 18:00, David Blaikie via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> Would it be that drastic to have this require a code change/compiler
>> rebuild to enable? It could be designed so the change is small/easy
>> (changing a constant) but that the default compilers we all ship around (&
>> especially not the official releases) don't allow access to this
>> functionality.
>>
>> Anyone wanting to gather data would have to make this small change,
>> rebuild their compiler, build their target with this feature & gatehr
>> results from there.
>>
>
> Then you might as well maintain a patchset outside the main repository and
> require patching the sources.
>

For the zero-out case, that's what I'm suggesting. But I'm also suggesting
the design of the non-zero-fill could be chosen to make that patchset
relatively small/easy to maintain (essentially an intentional source-level
extension point).


> What is time consuming and discouraging is not the complexity of the
> changes, but the fact that one has to rebuild the compiler in the first
> place, and make any changes at all.
>
> It would also make it much harder to build only part of a complex
> environment with the feature enabled - for example, building the underlying
> libraries with the default compiler, and the tools on top with the patched
> compiler.
>

That's kind of the goal - to increase the cost of usage somewhat so it's
less easy for it to become a baked in/depended on feature in the future.

- Dave


>
> .Andrea
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181127/64d90168/attachment.html>


More information about the cfe-dev mailing list