[LLVMdev] [cfe-dev] RFC: A proposal to move toward using C++11 features in LLVM & Clang / bounding support for old host compilers
"C. Bergström"
cbergstrom at pathscale.com
Mon Oct 28 18:07:49 PDT 2013
On 10/29/13 07:27 AM, Chandler Carruth wrote:
> On Mon, Oct 28, 2013 at 5:06 PM, "C. Bergström"
> <cbergstrom at pathscale.com <mailto:cbergstrom at pathscale.com>> wrote:
>
> fuzzy://How much "heads up"
>
>
> One full release cycle, so approximately 6 months before a release
If it's 3-6 months from *today* before something hits clang svn trunk
that should be enough time to address any problems. (Such as testing
libc++ more extensively and or sending any patches if necessary) I don't
know the 3.4 release timeline and if you want to adopt this immediately
after that has branched. [My other points below can be ignored if this
is true]
---------------------------------
> incorporating this. In addition, probably several weeks to a month
> between the initial branch for the 3.4 release and the commits that
> make this so. Still more weeks between when we put it into the release
> notes for 3.4 and blog about it.
>
> -1
> If we do it - we should do it properly.
>
>
> We're not talking about doing it improperly, but about doing two
> independent things independently.
>
> ---------
> I'm strongly against anything which forces this to rely on gnu
> runtime and libs.
>
>
> You are not being forced to rely on anything. Many people have
> successfully bootstrapped with libc++, and if you find issues with
> your setup doing such a bootstrap, patches to fix that would be very
> welcome.
>
> And moreover, a requirement to not use GNU runtimes or libraries in
> the bootstrap would be totally novel for the project. LLVM and Clang
> require xlC and MSVC to bootstrap on certain platforms, and you're OK
> with that? There are plenty of platforms with no Clang port at all but
> where GCC works fine, and we rely on a GCC host there. This is not
> new, and not something we should burden the discussion about C++11
> features with.
On linux amd64/intel64 is what I meant by "regression". The other
platforms you reference are still work-in-progress. It wasn't my
intention to include them as a blocker - (just to clarify)
>
> ---------
> Further - While c++11 is the best thing ever - Is there actually a
> driving use case where using c++11 features will significantly
> improve the quality of the codebase?
>
>
> Yes. See my first email for some of them. See numerous other
> discussions. Have you tried writing any code with C++11?
Cherry picking the points from your original email.
>
> Some notable features we would get to use:
>
> - r-value references, move semantics, etc
> - auto
> - range for loops
> - lambdas
> - static_assert
> - nullptr
> - std::unique_ptr, std::tuple, some other nice library stuff
>
>
I'd love to see/review an updated style guideline before anything hits
SVN trunk so that it's super clear on what's allowed. Maybe I'm too
conservative, but it's still fuzzy on how using some of those features
would benefit the compiler internally.
Usage of c++11 code in applications (chrome) and the compiler are 2
different worlds to me. You ask if I write c++11 codes - No, but
increasingly I do see it being used in production and forced to deal
with it. Sometimes it makes sense and sometimes I think meh or wtf -
If it doesn't make the code:
a. easier to read
b. easier to write
c. higher performance
it has no value or negative value.
--------------------------
I don't mean to nit-pick||troll and I'm not opposed to this idea at all
- I just like to have specifics and facts. (Please feel free to ignore
these questions below)
> It also would have the benefit of removing divergence between LLVM
> sub-projects already using C++11 features
Which sub-projects would this benefit?
>
> There is increasing pressure for LLVM to make use of new C++ language
> and library features.
pressure from where? (sub-projects, google.. ?)
>
> I have historically been more conservative on this topic, but
> listening to many people and looking at some of the C++ features we
> are missing
watercooler or mailing list?
>
>
> These days, this list seems increasingly worth the cost of forcing
> users to get a modern toolchain onto their systems.
>
I'm all for modern toolchains, but a modern toolchain requirement and
depending on c++11 features are independent issues. You could make a
policy that ______ doesn't care about building and supporting gcc-3.x on
________ old ${platform} - I'm cool with that, but it doesn't mean we
must rely on c++11 in the process.
More information about the llvm-dev
mailing list