LLVM features that ought to be surfaced in a higher-level language?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

LLVM features that ought to be surfaced in a higher-level language?

Talin-3
I've been out of touch with the LLVM community for a few years, and so I haven't kept up on all of the changes and improvements that have been added lately. I've been wondering if someone on this list would care to summarize what features of LLVM would be appropriate to expose as features of languages built on top of LLVM. In other words, if you were building a new LLVM-based language for general programming, how your language's feature set be affected by the capabilities already in LLVM? I'm focusing on language, and not compiler, features - so for example "faster code" is a compiler feature which doesn't usually affect the design of the language.

--
-- Talin

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: LLVM features that ought to be surfaced in a higher-level language?

Reid Kleckner-2
Some things come to mind:

- the patchpoint and stackmap intrinsics used by WebKit

- I added 'musttail', which can now be combined with varargs to implement a perfectly forwarding function that can modify some prefix of the arguments

- comdat groups are now explicit in the IR, so if you have mergeable C++ template-like constructs you can now group related things together

On Mon, Oct 6, 2014 at 11:08 AM, Talin <[hidden email]> wrote:
I've been out of touch with the LLVM community for a few years, and so I haven't kept up on all of the changes and improvements that have been added lately. I've been wondering if someone on this list would care to summarize what features of LLVM would be appropriate to expose as features of languages built on top of LLVM. In other words, if you were building a new LLVM-based language for general programming, how your language's feature set be affected by the capabilities already in LLVM? I'm focusing on language, and not compiler, features - so for example "faster code" is a compiler feature which doesn't usually affect the design of the language.

--
-- Talin

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: LLVM features that ought to be surfaced in a higher-level language?

Chris Lattner-2
In reply to this post by Talin-3

On Oct 6, 2014, at 11:08 AM, Talin <[hidden email]> wrote:

> I've been out of touch with the LLVM community for a few years, and so I haven't kept up on all of the changes and improvements that have been added lately. I've been wondering if someone on this list would care to summarize what features of LLVM would be appropriate to expose as features of languages built on top of LLVM. In other words, if you were building a new LLVM-based language for general programming, how your language's feature set be affected by the capabilities already in LLVM? I'm focusing on language, and not compiler, features - so for example "faster code" is a compiler feature which doesn't usually affect the design of the language.

Hi Talin,

What specifically are you asking about here?  Are you asking what LLVM features (e.g. arbitrary sized integers) would be interesting to expose in source languages?

With Swift as an example, we weren’t constrained by LLVM, we just nudged LLVM and its infrastructure in the right direction over time.  As one dumb example, Swift is why llvm::SourceMgr supports caret diagnostics, ranges and fixit hints.

-Chris



_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: LLVM features that ought to be surfaced in a higher-level language?

David Chisnall-5
In reply to this post by Reid Kleckner-2
On 6 Oct 2014, at 19:29, Reid Kleckner <[hidden email]> wrote:

> - I added 'musttail', which can now be combined with varargs to implement a perfectly forwarding function that can modify some prefix of the arguments

I missed this when it went in.  Does it rely on the target having the same calling convention for variadic and non-variadic functions?

David


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: LLVM features that ought to be surfaced in a higher-level language?

Reid Kleckner-2

Yes. And of course not long after implementing this for x86, I discovered this was not the case for Darwin arm64. =P

My goal was to use this for variadic virtual method adjustor thunks.

Sent from phone

On Oct 7, 2014 1:04 AM, "David Chisnall" <[hidden email]> wrote:
On 6 Oct 2014, at 19:29, Reid Kleckner <[hidden email]> wrote:

> - I added 'musttail', which can now be combined with varargs to implement a perfectly forwarding function that can modify some prefix of the arguments

I missed this when it went in.  Does it rely on the target having the same calling convention for variadic and non-variadic functions?

David


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev