On 31 August 2015 at 22:45, Akira Hatanaka <ahata...@gmail.com> wrote: > ahatanak added a comment. > > If it's important to be able to compile one file with > -fno-zero-initialized-in-bss and another without the option, we could add a > bit to GlobalVariable that indicates it shouldn't be go into the bss section. > Is that what you are suggesting?
Yes, but note that we don't need an extra bit, we can explicitly set the section. > If we are going to take that approach, users will be passing > -fno-zero-initialized-in-bss at compile time to set the bit for the > GlobalVariables clang creates and pass the option again at link time (which > will translate into -mllvm -nozero-initialized-in-bss) since some of the > passes that are run at link time create GlobalVariables. This on the other hand suggests that a global flag (i.e., your patch) is better. We don't optimize a function from SSE2 to SSE4, but we might noticed that the initializer of a GV is always zero and then have the choice of putting it in .bss or .data. Eric, any thoughts? Cheers, Rafael _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits