<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hello Anton.</span></div><div><span>Thanks for the comment.</span></div><div><span><br></span></div><div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; ">> Precisely this is the situation! There're two consecutive branches (br1cond<br>> and br2uncond). Inside of AnalyzeBranch, there's an opcode swap of br2uncond<br>> (ex. j_foward to j_backward). There I do BuildMI (newOpcode) and followed by<br>> br2uncond->eraseFromParent(). This results in br1cond loosing it's<br>> label/offset. How could I resolve this?<br>Your code is broken. AnalyzeBranch should not modify
anything.<br> </div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_23_132739287202771"><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_23_132739287202771">I was taking a clue from Mips/MipsInstrInfo.cpp: AnalyzeBranch :(</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_23_132739287202771">Could you please suggest appropriate alternative place for such a modification?</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_23_132739287202771"><span style="font-size: 12pt; ">Best regards,</span><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_23_132739287202771">Girish.</div> </div> </blockquote></div> </div></body></html>