Re: [PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions

2016-06-21 Thread Paul Robinson via cfe-commits
probinson added a comment. In http://reviews.llvm.org/D20647#462797, @Ilod wrote: > There is no longer a flag to treat implicit and explicit inline functions > exactly the same way, I don't kow if it's really useful (it can be if we want > to use the threshold difference between InlineHint and

Re: [PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions

2016-06-20 Thread Rudy Pons via cfe-commits
Ilod updated this revision to Diff 61318. Ilod added a comment. New patch, which instead add NoInline to function not marked (implicitly or explicitly) inline, when we use the -finline-hint-functions flag (effectily inlining only implicitly and explicitly inline functions). Also adds support fo

Re: [PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions

2016-06-17 Thread Paul Robinson via cfe-commits
probinson added a subscriber: probinson. probinson added a comment. I'm still bemused that Clang thinks of a defined-in-class method and a method marked with 'inline' as significantly different things. But given that it does, a way to make them be treated the same will be nice. ==

Re: [PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions

2016-06-17 Thread Reid Kleckner via cfe-commits
rnk added a comment. In http://reviews.llvm.org/D20647#460520, @Ilod wrote: > I don't think weak linkage defines this. Right, sorry, normal external linkage is the obvious case. I was hung up thinking about cases like this: volatile int x; template struct A { void f(); void g()

Re: [PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions

2016-06-16 Thread Rudy Pons via cfe-commits
Ilod added a comment. I don't think weak linkage defines this. For example, in: struct A { inline int foo() { return 0; } int bar() { return 1; } int baz(); }; int A::baz() { return 2; } With /Ob1, we should inline foo and bar, but never baz. But baz doesn't have weak linkage

Re: [PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions

2016-06-16 Thread Reid Kleckner via cfe-commits
rnk added a comment. Can't we implement /Ob1 by applying noinline to every non-inline specified function with weak linkage? http://reviews.llvm.org/D20647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

Re: [PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions

2016-06-16 Thread Rudy Pons via cfe-commits
Ilod added a reviewer: rnk. Ilod updated this revision to Diff 61029. Ilod added a comment. Updated to head revision, and pinging this. http://reviews.llvm.org/D20647 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/CodeGen/CodeGenFunction.cpp lib/Fro

[PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions

2016-05-25 Thread Rudy Pons via cfe-commits
Ilod created this revision. Ilod added a subscriber: cfe-commits. Add two flags (-finline-implicit-hint and -fno-inline-implicit-hint) to allow to add InlineHint on implicitly inline functions (constexpr and member functions of class that was defined in the class body). This is needed to add sup