Zachary Turner <zturner at google.com> writes:> On Tue, Oct 31, 2017 at 2:45 PM Justin Bogner <mail at justinbogner.com> wrote: > >> Zachary Turner via llvm-dev <llvm-dev at lists.llvm.org> writes: >> > >> > Issue: If we're going to make people bootstrap a compiler, we might as >> well >> > go all the way to C++17. >> > Comment: I'm not opposed. >> >> We shouldn't make people bootstrap the compiler without a very good >> reason. I really don't want to be in the situation where you have to get >> clang 3.7 to bootstrap 5.0 to bootstrap 7.0 to bootstrap 9.0 in 2019. >> > > Why would this many hops ever be necessary? System Compiler -> {Clang 5 or > GCC 7} -> Clang ToT should be sufficient to last until C++23, which we > probably wouldn't adopt until 2025-2030 anywayThere is no compiler today that accepts the "-std=c++20" flag, regardless of how much of c++20 they (are likely to) support. There are also presumably some bugs, so I think this claim is a bit disingenuous.>> >> > * Clang 6 supports all of C++20, and it builds with only C++11, so we >> > shouldn't have to worry too much about the problem of needing to "daisy >> > chain" compilers to finally get the latest version of LLVM building. >> "GCC >> > 4.8 -> Clang 6 - > Clang ToT" should hold up through C++1z. >> >> I don't understand how this argument holds. If we change the minimum c++ >> standard we build with every time one comes out, we'll definitely have a >> long daisy chain of compilers that need to be built to start working on >> LLVM at all. >> > Clang 6 supports all of C++20. If we started requiring C++14 today, > someone can build Clang 6 with the system compiler and then build Clang ToT.C++20 doesn't exist yet. Clang 6 supports something that is very close to what C++20 will be. Also, Clang 6 *is* Clang ToT right now, so I think you mean they could build Clang 5 and then build Clang ToT.> If 3 months later we started requiring C++17, someone could build clang 6 > with the system compiler and then build Clang ToT. > > If 3 months later we started requiring C++20, someone could still build > clang 6 with the system compiler and then build Clang ToT. > > Every relaxation of the kind of code we can use in LLVM does not > necessitate an extra hop in the bootstrapping process, because existing > versions of clang can already compile through C++20.I hate to exaggerate, but this sounds almost like an argument for using new C++ features the day after we implement them. There obviously has to be some balance here.
On Tue, Oct 31, 2017 at 3:19 PM Justin Bogner <mail at justinbogner.com> wrote:> Zachary Turner <zturner at google.com> writes: > > > If 3 months later we started requiring C++17, someone could build clang 6 > > with the system compiler and then build Clang ToT. > > > > If 3 months later we started requiring C++20, someone could still build > > clang 6 with the system compiler and then build Clang ToT. > > > > Every relaxation of the kind of code we can use in LLVM does not > > necessitate an extra hop in the bootstrapping process, because existing > > versions of clang can already compile through C++20. > > I hate to exaggerate, but this sounds almost like an argument for using > new C++ features the day after we implement them. There obviously has to > be some balance here. >Someone could probably use that line of reasoning to argue for using new features immediately after implementing them, but that someone wouldn't be me :) In any case, the point was simply to illustrate that, in general, you do not need to add a hop to the bootstrapping process every time you bump the language standard. C++20 is 4-6 years out before we're even discussing it though, and any discussion we have about if, when, or how to move to it now will probably be irrelevant by that time. For C++14 and C++17 though, I think the argument still holds. System Compiler -> {GCC 7 or Clang 5-6} -> ToT should require only 1 hop regardless of language standard, and that covers us for quite a while. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171031/b11d4c77/attachment-0001.html>
Zachary Turner <zturner at google.com> writes:> On Tue, Oct 31, 2017 at 3:19 PM Justin Bogner <mail at justinbogner.com> wrote: > >> Zachary Turner <zturner at google.com> writes: >> >> > If 3 months later we started requiring C++17, someone could build clang 6 >> > with the system compiler and then build Clang ToT. >> > >> > If 3 months later we started requiring C++20, someone could still build >> > clang 6 with the system compiler and then build Clang ToT. >> > >> > Every relaxation of the kind of code we can use in LLVM does not >> > necessitate an extra hop in the bootstrapping process, because existing >> > versions of clang can already compile through C++20. >> >> I hate to exaggerate, but this sounds almost like an argument for using >> new C++ features the day after we implement them. There obviously has to >> be some balance here. >> > > Someone could probably use that line of reasoning to argue for using new > features immediately after implementing them, but that someone wouldn't be > me :) > > In any case, the point was simply to illustrate that, in general, you do > not need to add a hop to the bootstrapping process every time you bump the > language standard. C++20 is 4-6 years out before we're even discussing itGiven that we're discussing moving to c++17 in 2017, less than 2 months after we released a compiler that even accepts the flag for c++17, I don't see why we wouldn't be discussing c++20 for "4 to 6 years". If we're honestly considering c++17 now, we'll be honestly considering c++20 in 2020. If we do want to adopt a policy where we start using a new standard the year it's approved, I think we need to be realistic about our expectations on how we'll need to bootstrap it.> will probably be irrelevant by that time. > > For C++14 and C++17 though, I think the argument still holds. System > Compiler -> {GCC 7 or Clang 5-6} -> ToT > > should require only 1 hop regardless of language standard, and that covers > us for quite a while.For c++14 I'm significantly less concerned policy-wise, though I'm not personally convinced the productivity improvements we'll get from moving to c++14 are really worth the churn.
On Tue, Oct 31, 2017 at 6:26 PM, Zachary Turner via llvm-dev < llvm-dev at lists.llvm.org> wrote:> > On Tue, Oct 31, 2017 at 3:19 PM Justin Bogner <mail at justinbogner.com> > wrote: > >> Zachary Turner <zturner at google.com> writes: >> >> > If 3 months later we started requiring C++17, someone could build clang >> 6 >> > with the system compiler and then build Clang ToT. >> > >> > If 3 months later we started requiring C++20, someone could still build >> > clang 6 with the system compiler and then build Clang ToT. >> > >> > Every relaxation of the kind of code we can use in LLVM does not >> > necessitate an extra hop in the bootstrapping process, because existing >> > versions of clang can already compile through C++20. >> > The feature set of C++20 is not closed yet by the committee. I don't seewhere this is coming from (but if you would like to share, then please do tell).> >> I hate to exaggerate, but this sounds almost like an argument for using >> new C++ features the day after we implement them. There obviously has to >> be some balance here. >> > > Someone could probably use that line of reasoning to argue for using new > features immediately after implementing them, but that someone wouldn't be > me :) > > In any case, the point was simply to illustrate that, in general, you do > not need to add a hop to the bootstrapping process every time you bump the > language standard. C++20 is 4-6 years out before we're even discussing it > though, and any discussion we have about if, when, or how to move to it now > will probably be irrelevant by that time. > > For C++14 and C++17 though, I think the argument still holds. System > Compiler -> {GCC 7 or Clang 5-6} -> ToT >Copies of C++17 are not available for sale yet. There will likely be tweaks in the wording and in the implementation. It would be quite unfortunate to pick up C++17 for development on ToT only to discover 3 years afterwards that some range of revisions can only be built properly with some specific build compilers with a particular bug/interpretation of the feature.> > should require only 1 hop regardless of language standard, and that covers > us for quite a while. > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171031/c2a5e98f/attachment.html>