Chris Lattner
2004-Jan-07 14:20 UTC
[LLVMdev] 9 Ideas To Better Support Source Language Developers
On Wed, 7 Jan 2004, Valery A.Khamenya wrote:> just imagine, that we have Linux cluster, and we have two functions in > one module (`f' and `g'). If they are about to be executed at one host, > then one is allowed to do very aggressive interprocedural > optimizations between these `f' and `g'. However if `g' should be > "outsourced to" (i.e. "executed at") other host then `f', then one is > prohibited to do almost any optimizations between `f' and `g'.Typically distributed computing like this is performed at a much higher level than things like LLVM. Mechanisms like RPC (remote procedure calls) are used to do things like this, which makes the low-level code look a lot different than a standard call.> Am I right up to here? if `yes' then: > One is hardly able to make support for distributed calculations on top > of LLVM. Because, in order to make legal optimizations LLVM should > _know_ where the code is really executed.The RPC calls would automatically make the LLVM transformations safe: even the interprocedural optimizations are conservatively correct in the face of partial and incomplete programs (if they can't figure out what a piece of code is doing, they won't break it). LLVM should support distributed computing as well as, say, C does... not that C supports is particularly well... :) -Chris -- http://llvm.cs.uiuc.edu/ http://www.nondot.org/~sabre/Projects/
Valery A.Khamenya
2004-Jan-07 15:24 UTC
[LLVMdev] 9 Ideas To Better Support Source Language Developers
Hello Chris, Wednesday, January 7, 2004, 9:37:19 PM, you wrote: CL> Typically distributed computing like this is performed at a much higher CL> level than things like LLVM. almost right, if you mean "distributed computing is usually implemented as some compiled libs". But if it is a part of the language then it is not as you say :) Well, Chris, let's forget about traditions (finally LLVM is tradition-breaking thing!). At which level the optimization like i've meant *should* be implemented?.. If a priori optimization is restricted to a one host, then nothing to discuss. But just imagine that you say: "OK, let's make a basic support for code eval distributed to multiple hosts" :) CL> Mechanisms like RPC (remote procedure calls) CL> are used to do things like this, which makes the low-level code look a lot CL> different than a standard call. RPC call has nothing to do with optimization. The code should be _ready_ before applying RPC. CL> LLVM should support distributed computing as well as, say, C does... not CL> that C supports is particularly well... :) you are right, but you didn't get my point completely. I'd say: 1. LLVM is OK for distributed computing, because ...it has nothing to do with this directly, e.g. like C :) 2. LLVM could bring a *lot* to distributed computing, if distributed computing will be a *part* of LLVM concept. OK, Chris, let's put it in another way. Just think of those guys, who implement nice languages for distributed computing (e.g. http://www.mozart-oz.org/) and ask yourself, why <b>exactly this</b> audience should be excited with LLVM? Why should they find some nice LLVM optimization specific for the applications, where _part_ of the code might be EITHER executed at current host OR outsourced to some other host, because, say, current host is just quite busy? -- Maybe you'll find answer more suitable for you, then I try to formulate in Idea 10 :) -- Best regards, Valery A.Khamenya mailto:khamenya at mail.ru Local Time: 22:08
Chris Lattner
2004-Jan-07 17:43 UTC
[LLVMdev] 9 Ideas To Better Support Source Language Developers
On Wed, 7 Jan 2004, Valery A.Khamenya wrote:> Wednesday, January 7, 2004, 9:37:19 PM, you wrote: > > Well, Chris, let's forget about traditions (finally LLVM is > tradition-breaking thing!). At which level the optimization like i've > meant *should* be implemented?..Ok, I thought you were concerned about LLVM breaking the _correctness_ of distributed programs, sorry. :)> If a priori optimization is restricted to a one host, then nothing to > discuss. But just imagine that you say: "OK, let's make a basic > support for code eval distributed to multiple hosts" :) > 2. LLVM could bring a *lot* to distributed computing, if distributed > computing will be a *part* of LLVM concept.Sure, that makes sense. It's quite possible that there are things that make sense to move down to the LLVM level, exposing all kinds of neat opportunities. If you'd like to look into this, that would be cool! :) -Chris -- http://llvm.cs.uiuc.edu/ http://www.nondot.org/~sabre/Projects/