当前位置: 首页>>代码示例>>C++>>正文


C++ iterator::isLabel方法代码示例

本文整理汇总了C++中machinebasicblock::iterator::isLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ iterator::isLabel方法的具体用法?C++ iterator::isLabel怎么用?C++ iterator::isLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在machinebasicblock::iterator的用法示例。


在下文中一共展示了iterator::isLabel方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: insertCallUses

MachineBasicBlock::iterator
Filler::findDelayInstr(MachineBasicBlock &MBB,
                       MachineBasicBlock::iterator slot)
{
  SmallSet<unsigned, 32> RegDefs;
  SmallSet<unsigned, 32> RegUses;
  bool sawLoad = false;
  bool sawStore = false;

  MachineBasicBlock::iterator I = slot;

  if (slot->getOpcode() == SP::RET)
    return MBB.end();

  if (slot->getOpcode() == SP::RETL) {
    --I;
    if (I->getOpcode() != SP::RESTORErr)
      return MBB.end();
    //change retl to ret
    slot->setDesc(TII->get(SP::RET));
    return I;
  }

  //Call's delay filler can def some of call's uses.
  if (slot->isCall())
    insertCallUses(slot, RegUses);
  else
    insertDefsUses(slot, RegDefs, RegUses);

  bool done = false;

  while (!done) {
    done = (I == MBB.begin());

    if (!done)
      --I;

    // skip debug value
    if (I->isDebugValue())
      continue;


    if (I->hasUnmodeledSideEffects()
        || I->isInlineAsm()
        || I->isLabel()
        || I->hasDelaySlot()
        || isDelayFiller(MBB, I))
      break;

    if (delayHasHazard(I, sawLoad, sawStore, RegDefs, RegUses)) {
      insertDefsUses(I, RegDefs, RegUses);
      continue;
    }

    return I;
  }
  return MBB.end();
}
开发者ID:CartBlanche,项目名称:llvm,代码行数:58,代码来源:DelaySlotFiller.cpp

示例2: SkipPHIsAndLabels

 // SkipPHIsAndLabels - Copies need to be inserted after phi nodes and
 // also after any exception handling labels: in landing pads execution
 // starts at the label, so any copies placed before it won't be executed!
 MachineBasicBlock::iterator SkipPHIsAndLabels(MachineBasicBlock &MBB,
                                             MachineBasicBlock::iterator I) {
   // Rather than assuming that EH labels come before other kinds of labels,
   // just skip all labels.
   while (I != MBB.end() &&
          (I->getOpcode() == TargetInstrInfo::PHI || I->isLabel()))
     ++I;
   return I;
 }
开发者ID:blickly,项目名称:llvm-clang-PRETC,代码行数:12,代码来源:PHIElimination.cpp

示例3: while

MachineBasicBlock::iterator
MachineBasicBlock::SkipPHIsAndLabels(MachineBasicBlock::iterator I) {
  while (I != end() && (I->isPHI() || I->isLabel() || I->isDebugValue()))
    ++I;
  // FIXME: This needs to change if we wish to bundle labels / dbg_values
  // inside the bundle.
  assert(!I->isInsideBundle() &&
         "First non-phi / non-label instruction is inside a bundle!");
  return I;
}
开发者ID:CartBlanche,项目名称:llvm,代码行数:10,代码来源:MachineBasicBlock.cpp

示例4: while

MachineBasicBlock::iterator
MachineBasicBlock::SkipPHIsAndLabels(MachineBasicBlock::iterator I) {
  while (I != end() && (I->isPHI() || I->isLabel() || I->isDebugValue()))
    ++I;
  return I;
}
开发者ID:Bootz,项目名称:multicore-opimization,代码行数:6,代码来源:MachineBasicBlock.cpp


注:本文中的machinebasicblock::iterator::isLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。