[LLVMdev] delete/creates modules

Chris Lattner sabre at nondot.org
Mon Aug 13 13:35:09 PDT 2007


On Mon, 13 Aug 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?

Sure, you can change stuff *within* a module, you just can't create or 
delete new modules.

> 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 ... :-(

It depends.  If the processor can transparently switch between two modes 
(e.g. arm and thumb) then you probably want some sort of attribute that 
you add to each function that specifies which target to compile for.

I don't think that the cell supports this, so it probably wants two 
modules, one with SPU code one with PPC code in it.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list