From 9cc680ddf9760249dda5c656b80bc761f857f5dc Mon Sep 17 00:00:00 2001 From: Dmitry Mikushin Date: Wed, 4 Dec 2013 22:02:14 +0100 Subject: [PATCH] Catching up with LLVM trunk --- Makefile.in | 2 +- README.md | 6 +++++- include/KernelDataFlow/BlockProcessor/BlockProcessor.h | 6 +++--- include/KernelDataFlow/GraphProperties.h | 2 +- include/KernelDataFlow/KernelDataFlow.h | 6 +++--- src/BlockProcessor/AnalyzeOperandValue.cpp | 1 + 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7dc8e27..71ebbc0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -LLVM_ROOT = /opt/llvm/3.2 +LLVM_ROOT = /home/marcusmae/forge/llvm/build/install LLVM_CONFIG = $(LLVM_ROOT)/bin/llvm-config CXX = $(LLVM_ROOT)/bin/clang++ diff --git a/README.md b/README.md index 19b62b1..e1c4b1e 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,11 @@ You can input C or C++ code where the kernel function is annotated. Annotation is done by setting `__attribute__((annotate("kernel")))` right before the kernel function, i.e. its declaration or definition. Once the kernel function was processed, a graph is generated which currently is written to disk as Graphviz -file. This file can then be further processed, e.g. to create a visualization. +file. This file can then be further processed, e.g. to create a visualization, +for example: + +`$ clang -emit-llvm -S -c example/loop.c -o - | opt -load ./KernelDataFlow.so -KernelDataFlow && dot -Tpdf graph.dot -o graph.pdf` + Furthermore, block-related graphs can be found within the `graphs` directory. The pass is yet extendable to also use the in-memory graph. To do so, simply create a new folder inside the `src` directory, copy the Makefile of one of diff --git a/include/KernelDataFlow/BlockProcessor/BlockProcessor.h b/include/KernelDataFlow/BlockProcessor/BlockProcessor.h index c8b461d..44cd80b 100644 --- a/include/KernelDataFlow/BlockProcessor/BlockProcessor.h +++ b/include/KernelDataFlow/BlockProcessor/BlockProcessor.h @@ -8,9 +8,9 @@ #ifndef BLOCKPROCESSOR_H_ #define BLOCKPROCESSOR_H_ -#include -#include -#include +#include +#include +#include #include diff --git a/include/KernelDataFlow/GraphProperties.h b/include/KernelDataFlow/GraphProperties.h index 5c98506..24c8da8 100644 --- a/include/KernelDataFlow/GraphProperties.h +++ b/include/KernelDataFlow/GraphProperties.h @@ -1,7 +1,7 @@ #ifndef GRAPH_PROPERTIES_H #define GRAPH_PROPERTIES_H -#include +#include #include #include diff --git a/include/KernelDataFlow/KernelDataFlow.h b/include/KernelDataFlow/KernelDataFlow.h index b9751ce..fbe2556 100644 --- a/include/KernelDataFlow/KernelDataFlow.h +++ b/include/KernelDataFlow/KernelDataFlow.h @@ -2,9 +2,9 @@ #define KERNEL_DATA_FLOW_H #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/BlockProcessor/AnalyzeOperandValue.cpp b/src/BlockProcessor/AnalyzeOperandValue.cpp index a7d33ed..e02c1d3 100644 --- a/src/BlockProcessor/AnalyzeOperandValue.cpp +++ b/src/BlockProcessor/AnalyzeOperandValue.cpp @@ -7,6 +7,7 @@ #include +#include #include #include