[LLVMdev] Resolving branch instr with label "$BB0_-1"
anton at korobeynikov.info
Tue Jan 24 11:06:34 CST 2012
>> br2uncond->eraseFromParent(). This results in br1cond loosing it's
>> label/offset. How could I resolve this?
> Your code is broken. AnalyzeBranch should not modify anything.
> I was taking a clue from Mips/MipsInstrInfo.cpp: AnalyzeBranch :(
> Could you please suggest appropriate alternative place for such a
Ah sorry, my memory served me wrong. You can modify the stuff there,
but very careful :)
It's hard to tell w/o seeing the actual code. But I don't see how
inserting new instruction inside MBB might invalidate the BB
destinations of other stuff.
If you're doing more complex stuff (e.g. insert / remove BBs), then
you should carefully update all possible references.
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the LLVMdev