ADD MORE FUNCTIONS!
[oota-llvm.git] / lib / Analysis / DataStructure / PgmDependenceGraph.cpp
index 63a0cdf0899d25fa38e4eb392e7de1145875a662..b861c89947815e056adcd45dc5cb529cf27a736c 100644 (file)
@@ -1,5 +1,12 @@
 //===- PgmDependenceGraph.cpp - Enumerate PDG for a function ----*- C++ -*-===//
 // 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
+// 
 // The Program Dependence Graph (PDG) for a single function represents all
 // data and control dependences for the function.  This file provides an
 // iterator to enumerate all these dependences.  In particular, it enumerates:
 // The MemoryDepAnalysis does build an explicit graph, which is used internally
 // here.  That graph could be augmented with the other dependences above if
 // desired, but for most uses there will be little need to do that.
+//
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Analysis/PgmDependenceGraph.h"
 #include "llvm/Analysis/MemoryDepAnalysis.h"
 #include "llvm/Analysis/PostDominators.h"
 #include "llvm/Function.h"
-#include "llvm/BasicBlock.h"
-#include "llvm/Instruction.h"
-
 
+namespace llvm {
 
 //----------------------------------------------------------------------------
 // class DepIterState
@@ -78,7 +84,7 @@ bool DepIterState::SetFirstSSADep()
   if (doIncomingDeps)
     for (Instruction::op_iterator E = depNode->getInstr().op_end();
          ssaInEdgeIter != E &&
-           (firstTarget = dyn_cast<Instruction>(ssaInEdgeIter->get()))== NULL; )
+           (firstTarget = dyn_cast<Instruction>(ssaInEdgeIter))== NULL; )
       ++ssaInEdgeIter;
   else
     for (Value::use_iterator E = depNode->getInstr().use_end();
@@ -248,3 +254,5 @@ void PgmDependenceGraph::dump() const
 
 static RegisterAnalysis<PgmDependenceGraph>
 Z("pgmdep", "Enumerate Program Dependence Graph (data and control)");
+
+} // End llvm namespace