diff --git a/.gitignore b/.gitignore index 416ef8e2ac7ae625fed7cba705f902a6550fe240..22b358c9549b595d07910fd3ed4fa543b73027a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ Release+Asserts libclc +.ycm_extra_conf.py *.inc Output *.o diff --git a/llvm/include/llvm/Transforms/BuildDFG.h b/llvm/include/llvm/Transforms/BuildDFG.h deleted file mode 100644 index 0913460fbe17395d6a4919f8d0cf25a874d753e9..0000000000000000000000000000000000000000 --- a/llvm/include/llvm/Transforms/BuildDFG.h +++ /dev/null @@ -1,111 +0,0 @@ -//==- llvm/Transforms/BuildDFG.h - Hierarchical Dataflow Graph Builder Pass -=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header file defines prototypes for accessor functions that expose passes -// in the viscc compiler. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_TRANSFORMS_BUILDDFG_H -#define LLVM_TRANSFORMS_BUILDDFG_H - -#include "llvm/ADT/Statistic.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/IntrinsicInst.h" -#include "llvm/Transforms/DFGraph.h" - -namespace llvm { - -STATISTIC(IntrinsicCounter, "Counts number of visc intrinsics greeted"); - -class BuildDFG : public ModulePass { - - public: - static char ID; // Pass identification, replacement for typeid - BuildDFG() : ModulePass(ID) {} - - private: - // Member variables - DFInternalNode *Root; - typedef ValueMap<Value*, DFNode*> HandleToDFNode; - HandleToDFNode HandleToDFNodeMap; // This map associates the i8* pointer - // with the DFNode structure that it - // represents - - - // Functions - bool isViscIntrinsic(Instruction * I); - void handleCreateNode (DFInternalNode* N, IntrinsicInst* II); - void handleCreateEdge (DFInternalNode* N, IntrinsicInst* II); - - void BuildGraph (DFInternalNode* N, Function* F); - void viewDFGraph(DFGraph *G); - - public: - virtual bool runOnModule(Module &M); - DFInternalNode* getRoot() { - return Root; - } -}; - - -template <> struct llvm::GraphTraits<DFNode*> { - typedef DFNode NodeType; - typedef typename DFNode::successor_iterator ChildIteratorType; - - static inline ChildIteratorType child_begin(NodeType *N) { - return N->successors_begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->successors_end(); - } - -}; - -template <> struct llvm::GraphTraits<DFGraph*> : public GraphTraits<DFNode*> { - typedef typename DFGraph::children_iterator nodes_iterator; - - static NodeType *getEntryNode(DFGraph* G) { - return G->front(); - } - - static nodes_iterator nodes_begin(DFGraph *G) { - return G->begin(); - } - - static inline nodes_iterator nodes_end(DFGraph *G) { - return G->end(); - } -}; - -template<> -struct llvm::DOTGraphTraits<DFGraph*> : public DefaultDOTGraphTraits { - - DOTGraphTraits (bool isSimple=false) - : DefaultDOTGraphTraits(isSimple) {} - - static std::string getGraphName(DFGraph* G) { - DFInternalNode* Parent = G->getParent(); - if(Parent != NULL) - return Parent->getFuncPointer()->getName(); - else - return "Dataflow Graph"; - } - - std::string getNodeLabel (DFNode* N, DFGraph* G) { - return N->getFuncPointer()->getName(); - } - - static void addCustomGraphFeatures(DFGraph* G, GraphWriter<DFGraph*> &GW) { - - } -}; - -} // end of namespace llvm -#endif