Hello all, I have read the chapter "Writing an LLVM Pass" and noticed that there is a topic "Multithreaded LLVM". However I have no idea about this. I am wondering to know whether the goal of this extension is: 1. Multiple threads handle different modules (Thread : Module = 1 : 1) or 2. Multiple threads handle one module (Thread : Module = N : 1) Thanks a lot -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121009/25652b8a/attachment.html>
陳韋任 (Wei-Ren Chen)
2012-Oct-09 03:16 UTC
[LLVMdev] "Multithreaded LLVM" in "Writing an LLVM Pass"
On Tue, Oct 09, 2012 at 01:26:21AM +0800, Lu Mitnick wrote:> Hello all, > > I have read the chapter "Writing an LLVM Pass" and noticed that there is a > topic "Multithreaded LLVM". However I have no idea about this. I am wondering > to know whether the goal of this extension is: > > 1. Multiple threads handle different modules (Thread : Module = 1 : 1)Should be this. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
David Chisnall
2012-Oct-09 07:35 UTC
[LLVMdev] "Multithreaded LLVM" in "Writing an LLVM Pass"
On 8 Oct 2012, at 18:26, Lu Mitnick wrote:> 1. Multiple threads handle different modules (Thread : Module = 1 : 1) > orFor ModulePasses, yes.> 2. Multiple threads handle one module (Thread : Module = N : 1)For FunctionPasses, yes. Note that this part is in the future work section, meaning that no one has done it yet. FunctionPasses are independent of each other when running on different functions, so it would be fairly simple to use something like libdispatch to optimise every function within a module independently. FunctionPasses are not (in theory) allowed to modify any module state outside of a function, so they should be able to be run concurrently. David
Chandler Carruth
2012-Oct-09 07:46 UTC
[LLVMdev] "Multithreaded LLVM" in "Writing an LLVM Pass"
On Tue, Oct 9, 2012 at 12:35 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:> On 8 Oct 2012, at 18:26, Lu Mitnick wrote: > > > 1. Multiple threads handle different modules (Thread : Module = 1 : 1) > > or > > For ModulePasses, yes. > > > 2. Multiple threads handle one module (Thread : Module = N : 1) > > For FunctionPasses, yes. > > Note that this part is in the future work section, meaning that no one has > done it yet. FunctionPasses are independent of each other when running on > different functions, so it would be fairly simple to use something like > libdispatch to optimise every function within a module independently. > FunctionPasses are not (in theory) allowed to modify any module state > outside of a function, so they should be able to be run concurrently. >To the best of my knowledge this is not true: global variables' use-def chains are shared (as are Constants, but for less good reason there). I have a completely crazy plan for how to parallelize function passes, but it is not at all clear that it will work, and even if it does, it is a very significant and invasive change to LLVM's core infrastructure.> > David > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121009/f733e31f/attachment.html>
陳韋任 (Wei-Ren Chen)
2012-Oct-09 07:55 UTC
[LLVMdev] "Multithreaded LLVM" in "Writing an LLVM Pass"
On Tue, Oct 09, 2012 at 08:35:57AM +0100, David Chisnall wrote:> On 8 Oct 2012, at 18:26, Lu Mitnick wrote: > > > 1. Multiple threads handle different modules (Thread : Module = 1 : 1) > > or > > For ModulePasses, yes. > > > 2. Multiple threads handle one module (Thread : Module = N : 1) > > For FunctionPasses, yes. > > Note that this part is in the future work section, meaning that no one has done it yet. FunctionPasses are independent of each other when running on different functions, so it would be fairly simple to use something like libdispatch to optimise every function within a module independently. FunctionPasses are not (in theory) allowed to modify any module state outside of a function, so they should be able to be run concurrently.No one has done it yet? From [1], it seems parallel JIT is workable. Or I just misread the question? Regards, chenwj [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-January/046901.html -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
Maybe Matching Threads
- [LLVMdev] "Multithreaded LLVM" in "Writing an LLVM Pass"
- [LLVMdev] "Multithreaded LLVM" in "Writing an LLVM Pass"
- [LLVMdev] "Multithreaded LLVM" in "Writing an LLVM Pass"
- [LLVMdev] (Possibly buggy?) doFinalization method behavior of FunctionPass
- [LLVMdev] (Possibly buggy?) doFinalization method behavior of FunctionPass