Skip to content

Source Analyzer is a simple clang compiler plugin for source characterizing applications.

License

Notifications You must be signed in to change notification settings

IT302/Source-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

###SourceAnalyzer

SourceAnalyzer is a simple clang compiler plugin for source characterizing applications. It walks the AST of an application and classifies nodes into categories such as for statement, if statement, etc. It was used in this work (CHO: A Benchmark Suite for OpenCL-based FPGA Accelerators).

###Building and Running

  • If you don't have clang/LLVM already set them up as recommend here http://clang.llvm.org/get_started.html
  • Copy this folder to tools/clang/examples
  • Add plugin to makefile in tools/clang/Makefile by appending the name of this directory to the line that starts with PARALLEL_DIRS. If you are using cmake update CMakeLists.txt.
  • build/rebuild LLVM or clang.
  • Run the plugin as follows
$ export BD=/path/to/build/directory
$ clang -cc1 -load $BD/lib/libSourceAnalyzer.so   some-input-file.c

SourceAnalyzer was tested with LLVM 3.4 /clang 3.4 and may not compile with other versions of LLVM or clang as APIs may differ. The latest information about clang plugins can be found here

About

Source Analyzer is a simple clang compiler plugin for source characterizing applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published