Example #1
0
MInstructionIterator
MBasicBlock::discardAt(MInstructionIterator &iter)
{
    AssertSafelyDiscardable(*iter);
    for (size_t i = 0; i < iter->numOperands(); i++)
        iter->discardOperand(i);

    return instructions_.removeAt(iter);
}
Example #2
0
void
MBasicBlock::discardAllInstructionsStartingAt(MInstructionIterator &iter)
{
    while (iter != end()) {
        for (size_t i = 0, e = iter->numOperands(); i < e; i++)
            iter->discardOperand(i);
        iter = instructions_.removeAt(iter);
    }
}
Example #3
0
void
MBasicBlock::discardAllInstructions()
{
    for (MInstructionIterator iter = begin(); iter != end(); ) {
        for (size_t i = 0, e = iter->numOperands(); i < e; i++)
            iter->discardOperand(i);
        iter = instructions_.removeAt(iter);
    }
    lastIns_ = NULL;
}