delete/creates modules

Hi,

is it possible to implement a pass which creates new modules or deletes old ones (which kind of pass could do this)?
Perhaps there is already a pass which implements that - but I didn't found it.

Ciao,
Nico

BTW: will there be one day the Cell BE slides on the dev-meeting webpages?

is it possible to implement a pass which creates new modules or
deletes old ones (which kind of pass could do this)?
Perhaps there is already a pass which implements that - but I didn't
found it.

Nope, passes work within a module, they can't create/delete them.

BTW: will there be one day the Cell BE slides on the dev-meeting
webpages?

I don't know. Pester Scott about it :slight_smile:

-Chris

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

Time to think about again :wink:
Nico

nico 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 ... :frowning:

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

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

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

No, the CellSPU backend (still being written) merely generates code for the SPU. It's like a regular compiler. No extra module creation or destruction.

LLVM will need some work to create a single, unified executable or even JIT code for both the PPU and SPU at the same time.

-scooter