Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-16 Thread Bruno Cardoso Lopes via cfe-commits
Thanks Eric!! On Mon, Nov 16, 2015 at 10:32 AM, Eric Christopher wrote: > Fixed thusly: > > dzur:~/sources/llvm/tools/clang> git svn dcommit > Committing to https://llvm.org/svn/llvm-project/cfe/trunk ... > A test/CodeGen/target-features-no-error.c > M lib/CodeGen/CodeGenFunction.cpp > Committed

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-16 Thread Eric Christopher via cfe-commits
Fixed thusly: dzur:~/sources/llvm/tools/clang> git svn dcommit Committing to https://llvm.org/svn/llvm-project/cfe/trunk ... A test/CodeGen/target-features-no-error.c M lib/CodeGen/CodeGenFunction.cpp Committed r253242 Thanks! -eric On Mon, Nov 16, 2015 at 9:48 AM Bruno Cardoso Lopes wrote: >

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-16 Thread Bruno Cardoso Lopes via cfe-commits
Hi Eric, On Fri, Nov 13, 2015 at 8:55 PM, Eric Christopher wrote: > This all sounds a little weird as _mm_mul_ps only requires sse. Can you give > me a testcase and command line that you're using to trigger this? clang -O3 -flto -arch x86_64h -fomit-frame-pointer -c test-suite/SingleSource/UnitT

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-13 Thread Eric Christopher via cfe-commits
This all sounds a little weird as _mm_mul_ps only requires sse. Can you give me a testcase and command line that you're using to trigger this? Thanks! -eric On Fri, Nov 13, 2015 at 8:28 PM Bruno Cardoso Lopes wrote: > Hi Eric, > > This is very nice! > > After the addition of this feature, LNT

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-13 Thread Bruno Cardoso Lopes via cfe-commits
Hi Eric, This is very nice! After the addition of this feature, LNT started crashing on x86_64h: FAIL: SingleSource/UnitTests/Vector/SSE/sse_expandfft.compile_time (3 of 2244) FAIL: SingleSource/UnitTests/Vector/SSE/sse_isamax.compile_time (4 of 2244) FAIL: SingleSource/UnitTests/Vector/SSE/sse_

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-13 Thread Eric Christopher via cfe-commits
On Wed, Nov 11, 2015 at 5:38 PM Richard Smith wrote: > On Wed, Nov 11, 2015 at 5:25 PM, Eric Christopher > wrote: > >> On Wed, Nov 11, 2015 at 5:03 PM Richard Smith >> wrote: >> >>> On Wed, Nov 11, 2015 at 4:44 PM, Eric Christopher via cfe-commits < >>> cfe-commits@lists.llvm.org> wrote: >>> >>

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-13 Thread Eric Christopher via cfe-commits
Hi Akira, I don't think there's currently a good reason we don't perform a diagnostic there, just right now we'd have to say something bland like "unable to inline always_inline function 'foo'" without a reason. We might not have gotten a diagnostic in the past because of compatibility reasons/tra

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-13 Thread Eric Christopher via cfe-commits
On Thu, Nov 12, 2015 at 11:55 AM Robinson, Paul < paul_robin...@playstation.sony.com> wrote: > > > > -Original Message- > > From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf > Of > > Eric Christopher via cfe-commits > > Sent: Wednesday, November 11, 2015 4:44 PM > > T

RE: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-12 Thread Robinson, Paul via cfe-commits
> -Original Message- > From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of > Eric Christopher via cfe-commits > Sent: Wednesday, November 11, 2015 4:44 PM > To: cfe-commits@lists.llvm.org > Subject: r252834 - Provide a frontend based error for always_inline > functi

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Akira Hatanaka via cfe-commits
Currently, we inline a function only if the call to isInlineViable returns true, which means there are cases where we don't inline functions marked always_inline. Is there a reason we haven't made changes to produce any diagnostic in those cases? The comment also says "should be inlined whenever po

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Eric Christopher via cfe-commits
On Wed, Nov 11, 2015 at 6:08 PM Akira Hatanaka wrote: > I think you are suggesting we change the inliner to produce a diagnostic > (error or warning?) when the callee is marked always_inline and its > function attributes are not compatible with the caller's > (functionsHaveCompatibleAttributes re

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Akira Hatanaka via cfe-commits
I think you are suggesting we change the inliner to produce a diagnostic (error or warning?) when the callee is marked always_inline and its function attributes are not compatible with the caller's (functionsHaveCompatibleAttributes returns false). Is that correct? On Wed, Nov 11, 2015 at 4:48 PM,

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Eric Christopher via cfe-commits
On Wed, Nov 11, 2015 at 5:38 PM Richard Smith wrote: > On Wed, Nov 11, 2015 at 5:25 PM, Eric Christopher > wrote: > >> On Wed, Nov 11, 2015 at 5:03 PM Richard Smith >> wrote: >> >>> On Wed, Nov 11, 2015 at 4:44 PM, Eric Christopher via cfe-commits < >>> cfe-commits@lists.llvm.org> wrote: >>> >>

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Richard Smith via cfe-commits
On Wed, Nov 11, 2015 at 5:25 PM, Eric Christopher wrote: > On Wed, Nov 11, 2015 at 5:03 PM Richard Smith > wrote: > >> On Wed, Nov 11, 2015 at 4:44 PM, Eric Christopher via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> Author: echristo >>> Date: Wed Nov 11 18:44:12 2015 >>> New Revi

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Eric Christopher via cfe-commits
On Wed, Nov 11, 2015 at 5:13 PM David Blaikie wrote: > On Wed, Nov 11, 2015 at 4:54 PM, David Blaikie wrote: > >> >> >> On Wed, Nov 11, 2015 at 4:44 PM, Eric Christopher via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> Author: echristo >>> Date: Wed Nov 11 18:44:12 2015 >>> New Rev

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Eric Christopher via cfe-commits
On Wed, Nov 11, 2015 at 5:03 PM Richard Smith wrote: > On Wed, Nov 11, 2015 at 4:44 PM, Eric Christopher via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: echristo >> Date: Wed Nov 11 18:44:12 2015 >> New Revision: 252834 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=252834

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread David Blaikie via cfe-commits
On Wed, Nov 11, 2015 at 4:54 PM, David Blaikie wrote: > > > On Wed, Nov 11, 2015 at 4:44 PM, Eric Christopher via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: echristo >> Date: Wed Nov 11 18:44:12 2015 >> New Revision: 252834 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=2

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Richard Smith via cfe-commits
On Wed, Nov 11, 2015 at 4:44 PM, Eric Christopher via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: echristo > Date: Wed Nov 11 18:44:12 2015 > New Revision: 252834 > > URL: http://llvm.org/viewvc/llvm-project?rev=252834&view=rev > Log: > Provide a frontend based error for always_inli

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread David Blaikie via cfe-commits
On Wed, Nov 11, 2015 at 4:44 PM, Eric Christopher via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: echristo > Date: Wed Nov 11 18:44:12 2015 > New Revision: 252834 > > URL: http://llvm.org/viewvc/llvm-project?rev=252834&view=rev > Log: > Provide a frontend based error for always_inli

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Eric Christopher via cfe-commits
FWIW we should also have the backend avoid inlining and perhaps produce a diagnostic if something makes it there as well. -eric On Wed, Nov 11, 2015 at 4:46 PM Eric Christopher via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: echristo > Date: Wed Nov 11 18:44:12 2015 > New Revision