本文整理汇总了C++中MInstruction::setNotInWorklist方法的典型用法代码示例。如果您正苦于以下问题:C++ MInstruction::setNotInWorklist方法的具体用法?C++ MInstruction::setNotInWorklist怎么用?C++ MInstruction::setNotInWorklist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MInstruction
的用法示例。
在下文中一共展示了MInstruction::setNotInWorklist方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
MInstruction*
Loop::popFromWorklist()
{
MInstruction* toReturn = worklist_.popCopy();
toReturn->setNotInWorklist();
return toReturn;
}
示例2: IonSpew
// Iterate backward on all instruction and attempt to truncate operations for
// each instruction which respect the following list of predicates: Has been
// analyzed by range analysis, the range has no rounding errors, all uses cases
// are truncating the result.
//
// If the truncation of the operation is successful, then the instruction is
// queue for later updating the graph to restore the type correctness by
// converting the operands that need to be truncated.
//
// We iterate backward because it is likely that a truncated operation truncates
// some of its operands.
bool
RangeAnalysis::truncate()
{
IonSpew(IonSpew_Range, "Do range-base truncation (backward loop)");
Vector<MInstruction *, 16, SystemAllocPolicy> worklist;
for (PostorderIterator block(graph_.poBegin()); block != graph_.poEnd(); block++) {
for (MInstructionReverseIterator iter(block->rbegin()); iter != block->rend(); iter++) {
// Set truncated flag if range analysis ensure that it has no
// rounding errors and no freactional part.
const Range *r = iter->range();
if (!r || r->hasRoundingErrors())
continue;
// Ensure all observable uses are truncated.
if (!AllUsesTruncate(*iter))
continue;
// Truncate this instruction if possible.
if (!iter->truncate())
continue;
// Delay updates of inputs/outputs to avoid creating node which
// would be removed by the truncation of the next operations.
iter->setInWorklist();
if (!worklist.append(*iter))
return false;
}
}
// Update inputs/outputs of truncated instructions.
IonSpew(IonSpew_Range, "Do graph type fixup (dequeue)");
while (!worklist.empty()) {
MInstruction *ins = worklist.popCopy();
ins->setNotInWorklist();
RemoveTruncatesOnOutput(ins);
AdjustTruncatedInputs(ins);
}
return true;
}