Beispiel #1
0
  /// \brief Set the currently active llvm::Instruction.
  ///
  void
  setActiveInstruction(llvm::Instruction const * const NewActiveInstruction) {
    ActiveInstruction = NewActiveInstruction;

    auto const BB = ActiveInstruction->getParent();
    if (BB != ActiveBasicBlock) {
      PreviousBasicBlock = ActiveBasicBlock;
      ActiveBasicBlock   = BB;
    }
  }
Beispiel #2
0
bool DINOGlobal::isFuncEntryInstruction(llvm::Instruction &I){

  llvm::BasicBlock *B = I.getParent();
  llvm::Function *F = B->getParent();
  llvm::BasicBlock &FuncEntryBlock = F->front();
  llvm::Instruction &FuncEntryInst = FuncEntryBlock.front();
  
  if( &I == &FuncEntryInst ){
    return true;
  }
  return false;

}