<p>Hi,</p>
<p>I am writing an llvm pass wherein I require to iterate MachineBasicBlocks in reverse. The ilist reverse_iterator is not functioning as expected. Nor is the ilist iterator working <br>in reverse (although -- operator is overloaded to do so). </p>

<p>for (MachineFunction::iterator MBBI = mf_->end(), E = mf_->begin();MBBI != E; --MBBI) <br>    {<br>        MachineBasicBlock *MBB = MBBI;<br>        DEBUG(dbgs()<<*MBB<<"\n");<br>    }</p>
<p>Any suggestion would be helpful. </p>
<p>Thanks.</p>