Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is LLVM suitable for parallel languages?

What properties of LLVM makes it good choice for implementation of (parallel, concurrent, distributed)-oriented language, what makes it bad?

like image 346
DSblizzard Avatar asked Mar 14 '10 09:03

DSblizzard


People also ask

Which programming languages use LLVM?

LLVM currently supports compiling of Ada, C, C++, D, Delphi, Fortran, Haskell, Julia, Objective-C, Rust, and Swift using various front ends. Widespread interest in LLVM has led to several efforts to develop new front ends for a variety of languages.

Who created LLVM?

One big reason is new tools for building languages—specifically, compilers. And chief among them is LLVM, an open source project originally developed by Swift language creator Chris Lattner as a research project at the University of Illinois.


2 Answers

LLVM is called LLVM (Low Level virtual machine) for a good reason. It is so low-level that you're not bound to any particular semantics for your source language.

There are some useful things in LLVM that makes compilation of some parallel languages easier - e.g., jumps to arbitrary blocks: http://llvm.org/docs/LangRef.html#blockaddress

And LLVM does not imply any particular runtime properties, does not force any specific implementation of GC. You can build whatever you want on top of it.

like image 131
SK-logic Avatar answered Oct 24 '22 12:10

SK-logic


For some practical examples in this space see http://code.google.com/p/gpuocelot/. It allows Cuda code to multitarget on x86.

like image 40
Steve Severance Avatar answered Oct 24 '22 13:10

Steve Severance