LiveIntervals analysis problem

Hello everyone,

please I need your help.

To reproduce my problem I created simple pass for backends (TestPass.cpp in attached files). That pass I call from Mips backend in this way (MipsTargetMachine.cpp):
bool MipsPassConfig::addPreRegAlloc() {
      addPass(createTestPass());
      return false;
}

The problem becomes, when I am trying compile file ldtoa.ll (in attached files). Compiling process ends with errors from LiveIntervalsAnalysis. Everything is ok without TestPass.

I don't understand what's going on. My pass doesn't do anything but call analyse. It is strange that the compiling process fails few passes after my pass.

Some suggestions?

Greetings,
Tom

P.S.: I work with LLVM 3.2 release.

ldtoa.ll (435 KB)

TestPass.cpp (1.01 KB)

Hi Tom. LiveIntervals does not know how to recompute itself after coalescing. So if you add a preRegAlloc pass, you *must* preserve LiveIntervalsAnalysis.

-Andy