Skip to content
Snippets Groups Projects
Commit f36e936e authored by Prakalp Srivastava's avatar Prakalp Srivastava
Browse files

Author: Prakalp Srivastava

Task: Added skeleton of Hierarchical DFG Builder Pass

File changes:
  A lib/Transforms/BuildDFG/BuildDFG.cpp
  A lib/Transforms/BuildDFG/BuildDFG.exports
  A lib/Transforms/BuildDFG/CMakeLists.txt
  A lib/Transforms/BuildDFG/Makefile
-
parent 2a3e8c97
No related branches found
No related tags found
No related merge requests found
//=== BuildDFG.cpp - Implements "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.
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "buildDFG"
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/Function.h"
#include "llvm/Pass.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
STATISTIC(IntrinsicCounter, "Counts number of visc intrinsics greeted");
namespace {
// BuildDFG - The first implementation.
struct BuildDFG : public FunctionPass {
static char ID; // Pass identification, replacement for typeid
BuildDFG() : FunctionPass(ID) {}
virtual bool runOnFunction(Function &F) {
++IntrinsicCounter;
errs() << "Intrinsics: ";
errs().write_escaped(F.getName()) << '\n';
return false;
}
};
}
char BuildDFG::ID = 0;
static RegisterPass<BuildDFG> X("buildDFG", "Hierarchical Dataflow Graph Builder Pass");
add_llvm_loadable_module( LLVMBuildDFG
BuildDFG.cpp
)
##===- lib/Transforms/BuildDFG/Makefile -----------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../
LIBRARYNAME = LLVMBuildDFG
LOADABLE_MODULE = 1
USEDLIBS =
include $(LEVEL)/Makefile.common
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment