Hi all,
The Cilk Plus developers at Intel are pleased to announce that our in-progress implementation of the Cilk Plus C/C++ language extensions in Clang/LLVM is now available on Github:
http://cilkplus.github.com/
You may recall that Cilk Plus in Clang was previously discussed here: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-November/thread.html#25495, including the reasons for hosting it out of tree. We are committed to continuing development in the open, and we would appreciate any feedback from the community on the design or implementation!
Repository Info
Ben,
This is great news! Thanks for making sure this ended up in the open.
Now what I'd like is some kind of (perhaps informal) "porting guide" for the compiler and the runtime. I'll want to get this working on other architectures, operating systems, etc.
-Hal
Hi Hal,
A porting guide is a great idea, and I would love to see Cilk Plus used on more platforms. I think we can start by describing at a high-level what the architecture-specific parts of the compiler and runtime are. This could live on a wiki page so anyone interested in porting Cilk Plus can contribute. Does that seem like a reasonable first step?
Ben
From: "Hal Finkel" <hfinkel@anl.gov>
To: "Ben Langmuir" <ben.langmuir@intel.com>
Cc: "Clang Developer's Mailing List" <cfe-dev@cs.uiuc.edu>
Sent: Thursday, February 28, 2013 5:06:00 PM
Subject: Re: [cfe-dev] Cilk Plus extensions in LLVM/Clang
> From: "Ben Langmuir" <ben.langmuir@intel.com>
> To: "Hal Finkel <hfinkel@anl.gov> (hfinkel@anl.gov)"
> <hfinkel@anl.gov>
> Cc: "Wei Pan" <wei.pan@intel.com>, "Andy Zhang"
> <andy.zhang@intel.com>, "Stefanus Du Toit"
> <stefanus.du.toit@intel.com>, "Douglas Gregor" <dgregor@apple.com>,
> "Clang Developer's Mailing List"
> <cfe-dev@cs.uiuc.edu>
> Sent: Thursday, February 28, 2013 2:52:24 PM
> Subject: RE: Cilk Plus extensions in LLVM/Clang
>
> Hi Hal,
>
> A porting guide is a great idea, and I would love to see Cilk Plus
> used on more platforms. I think we can start by describing at a
> high-level what the architecture-specific parts of the compiler and
> runtime are. This could live on a wiki page so anyone interested
> in
> porting Cilk Plus can contribute. Does that seem like a reasonable
> first step?
Yes, sounds great!
Also, (and perhaps this is really just a git question), is there an easy way to generate a patch against the upstream sources from a clone of the git repository?
Thanks again,
Hal
Hi,
Also, (and perhaps this is really just a git question), is there an easy way to generate a patch against the upstream sources from a clone of the git repository?
I think you want to have a look at : git help format-patch
Hope this helps.
Mehdi
From: "Mehdi AMINI" <mehdi.amini@silkan.com>
To: cfe-dev@cs.uiuc.edu
Sent: Thursday, March 7, 2013 8:37:25 PM
Subject: Re: [cfe-dev] Cilk Plus extensions in LLVM/Clang
Hi,
> Also, (and perhaps this is really just a git question), is there an
> easy way to generate a patch against the upstream sources from a
> clone of the git repository?
I think you want to have a look at : git help format-patch
Thanks for the reply, but I don't think that helps me. The problem is that the Cilk commits are interspersed with the commits merged from upstream, which is certainly normal, and the upstream source is not a branch in the repository (I think), so there does not seem to be a clear revision range from which to generate a patch.
Thanks again,
Hal
I'm not sure exactly what you want to achieve, but you can setup your local git with a branch tracking cilkplus, another branch tracking the LLVM git mirror, and your own local branches for your work and generated any diff/patch between these branches.
Mehdi
Also, (and perhaps this is really just a git question), is there an easy way to generate a patch against the upstream sources from a clone of the git repository?
You mean the differences between our "cilkplus" branch and LLVM/Clang trunk? I just pushed a master branch to clang and llvm, so if you do:
$ git fetch
$ git diff `git merge-base cilkplus origin/master`..cilkplus
That will give you a diff against the last revision that is common to the master and cilkplus branches. You could do "git diff origin/master..cilkplus", but that would include changes to master since our last merge, which would just confuse things.
Ben
From: "Ben Langmuir" <ben.langmuir@intel.com>
To: "Hal Finkel" <hfinkel@anl.gov>
Cc: "Clang Developer's Mailing List" <cfe-dev@cs.uiuc.edu>
Sent: Friday, March 8, 2013 8:07:23 AM
Subject: RE: [cfe-dev] Cilk Plus extensions in LLVM/Clang
> Also, (and perhaps this is really just a git question), is there an
> easy way to generate a patch against the upstream sources from a
> clone of the git repository?
You mean the differences between our "cilkplus" branch and LLVM/Clang
trunk? I just pushed a master branch to clang and llvm, so if you
do:
$ git fetch
$ git diff `git merge-base cilkplus origin/master`..cilkplus
How do I get your origin/master into my clone?
llvm$ git merge-base cilkplus origin/master
fatal: Not a valid object name origin/master
llvm$ git branch -a
* cilkplus
remotes/origin/HEAD -> origin/cilkplus
remotes/origin/cilkplus
Thanks again,
Hal
$ git fetch
$ git diff `git merge-base cilkplus origin/master`..cilkplus
How do I get your origin/master into my clone?
Did you run git fetch? I thought that would be sufficient.
From: "Ben Langmuir" <ben.langmuir@intel.com>
To: "Hal Finkel" <hfinkel@anl.gov>
Cc: "Clang Developer's Mailing List" <cfe-dev@cs.uiuc.edu>
Sent: Friday, March 8, 2013 8:25:45 AM
Subject: RE: [cfe-dev] Cilk Plus extensions in LLVM/Clang
>> $ git fetch
>> $ git diff `git merge-base cilkplus origin/master`..cilkplus
> How do I get your origin/master into my clone?
Did you run git fetch? I thought that would be sufficient.
Ack, apparently not. You're right. Thanks!
-Hal
By the way, there is a more compact way to achieve the equivalent with git:
$ git diff origin/master...cilkplus
Note the three dots rather than two between the revisions. This shows the
diffs from the common merge base up to the cilkplus branch tip.
Mark
By the way, there is a more compact way to achieve the equivalent with git:
$ git diff origin/master...cilkplus
Note the three dots rather than two between the revisions. This shows the diffs from the common merge base up to the cilkplus branch tip.
Mark
Good catch. I forgot about this syntax!
Hi Hal,
There is now a porting guide on the Github page wiki with information on the compiler and runtime library changes that are needed: https://github.com/cilkplus/clang/wiki/Porting-to-other-architectures
We look forward to merging your changes for other architectures and OSes.
Regards,
Andy
From: "Andy Zhang" <andy.zhang@intel.com>
To: "Hal Finkel" <hfinkel@anl.gov>
Cc: "Ben Langmuir" <ben.langmuir@intel.com>, "Wei Pan" <wei.pan@intel.com>, "Stefanus Du Toit"
<stefanus.du.toit@intel.com>, "Clang Developer's Mailing List" <cfe-dev@cs.uiuc.edu>
Sent: Tuesday, March 12, 2013 1:07:46 PM
Subject: RE: Cilk Plus extensions in LLVM/Clang
Hi Hal,
There is now a porting guide on the Github page wiki with information
on the compiler and runtime library changes that are needed:
https://github.com/cilkplus/clang/wiki/Porting-to-other-architectures
It seems from this guide that the first task is to make sure that __builtin_{setjmp/longjmp} work on the target platform. In r177666, I committed an implementation for PowerPC (inspired by the X86 implementation). You can now update your wiki 
Thanks again,
Hal
It seems from this guide that the first task is to make sure that __builtin_{setjmp/longjmp} work on the target platform. In r177666, I committed an implementation for PowerPC (inspired by the X86 implementation). You can now update your wiki 
Nice - I've updated the wiki. Feel free to edit the wiki yourself too, if you want 
Hi Hal,
This patch could allow you to compile and run the fib program on PPC!
Have you tried to compile the runtime on PPC? If you get it compiled (with possible fixes or hacks), then clang should be ready for compiling your fib program for PPC. Since there is no exception and floating point computations in fib, you could disable exceptions and the inline asm for saving floating point states (clang/lib/CodeGen/CGCilkPlusRuntime.cpp).
Thanks!
Wei
Ben, Mark,
This procedure used to work, but when I try this now (running git clone, then git fetch and then git diff origin/master...cilkplus), I get, in addition to the cilk changes, a bunch of other unrelated changes as well in the diff. Do you know how I might clean this up?
Thanks again,
Hal