本文整理汇总了C++中Iter::getParent方法的典型用法代码示例。如果您正苦于以下问题:C++ Iter::getParent方法的具体用法?C++ Iter::getParent怎么用?C++ Iter::getParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Iter
的用法示例。
在下文中一共展示了Iter::getParent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getNextMachineInstrInBB
// Find the next real instruction from the current position in current basic
// block.
static Iter getNextMachineInstrInBB(Iter Position) {
Iter I = Position, E = Position->getParent()->end();
I = std::find_if_not(I, E,
[](const Iter &Insn) { return Insn->isTransient(); });
return I;
}
示例2: insertDelayFiller
/// This function inserts clones of Filler into predecessor blocks.
static void insertDelayFiller(Iter Filler, const BB2BrMap &BrMap) {
MachineFunction *MF = Filler->getParent()->getParent();
for (BB2BrMap::const_iterator I = BrMap.begin(); I != BrMap.end(); ++I) {
if (I->second) {
MIBundleBuilder(I->second).append(MF->CloneMachineInstr(&*Filler));
++UsefulSlots;
} else {
I->first->insert(I->first->end(), MF->CloneMachineInstr(&*Filler));
}
}
}
示例3: getNextMachineInstr
// Find the next real instruction from the current position, looking through
// basic block boundaries.
static Iter getNextMachineInstr(Iter Position) {
if (std::next(Position) == Position->getParent()->end()) {
const MachineBasicBlock * MBB = (&*Position)->getParent();
for (auto *Succ : MBB->successors()) {
if (MBB->isLayoutSuccessor(Succ)) {
Iter I = Succ->begin();
Iter Next = getNextMachineInstrInBB(I);
if (Next == Succ->end()) {
return getNextMachineInstr(I);
} else {
return I;
}
}
}
llvm_unreachable("Should have identified the end of the function earlier!");
}
return getNextMachineInstrInBB(Position);
}