strange pass behaviour

Hi

I have written a pass which creates some scheduling information. Its called MParSchedule.
This pass works with opt. But when feeding it my experimental backend it seems to loose
instructions and fails to work. I am loading this stuff as .so libraries under linux and i am
using the amd64 version with a self compiled llvm-gcc.

With this call it works:
opt --load=/llvm/Debug/lib/MParSchedule.so -MParSchedule -f -o opt.o a.out.bc

With the following it won't:
llc --load=/llvm/Debug/lib/MParSchedule.so -load=/llvm/Debug/lib/libMyBackend.so -f -march=MyBackend a.out.bc

I am quite puzzled and would be happy if anyone would have a suggestion what goes wrong.
Which means the linefor the first instruction of the second block processed is missing (tmp1)
for my unoptimized example bytecode attached.

Am i not allowed to load a pass dynamically for llc? I doubt that i have memory corruption
since i am using the stl for all lists and stuff.

Thanks
ST

a.out.bc (670 Bytes)

Hi

In an chapter of "How to foot yourself in the shot" i requested the
pass-manager to do some passes before my pass and forgot that (via PM.add()).

So now the internal structures just look like the bytecode feeded to them.

ST