[LLVMdev] delete/creates modules

Chandler Carruth chandlerc at gmail.com
Mon Aug 13 12:45:42 PDT 2007


nico wrote:
> On Aug 13, 2007, at 9:11 PM, Chris Lattner wrote:
> 
>> Nope, passes work within a module, they can't create/delete them.
> 
> So there is no possibility to write a pass to arrange functions and  
> globals in a different than the given way? No way to partition the  
> structure new?
> 
> I would really like to know how code is generated for heterogeneous  
> architectures like Cell? I thought they use a kind of (module?)  
> partition to difference between the parts that should be mapped on  
> SPU and PPU ... :-(

First off, I don't think SPU / PPU is done quite like this, and even if
it were, LLVM probably wouldn't be aware of it at that level.

My understanding is that the SPU code is generated separately, and
stored in a large data "blob" within the PPU program. This main program
hands the binary blob off to the SPU(s) to run. This doesn't involve any
kind of partitioning precisely, just a two-stage (and somewhat ugly)
compile process.

More directly, the work Scott and others here at Aerospace (I'm working
at Aerospace for the summer) are doing for the Cell BE back end (Yes,
confusing) is mostly targeted at just the first compile phase I
mentioned above -- compiling some code to the SPU object code, for
potential inclusion in a larger PPU program. The latter part should not
be very difficult at all, as PPC support is already present in LLVM.

I hope this clarifies some of the murkiness, and anyone with more direct
experience on the Cell, please step in and correct any of the blunder's
I've made.

-Chandler

> 
> Time to think about again ;-)
> Nico
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list