Skip to content

JoraGevorgyan/Project3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

A simple LLVM Pass

General info

    This is a simple LLVM Pass which will count all loops in given bit code (file.bc)

I used this llvm-project

Setup

    To do this, you need to follow these steps

step 1

    * clone this repo to your local machine
    * Copy the LoopCntr file into PathToLLVMProject/llvm/lib/Transforms/

step 2

    add following line into PathToLLVMProject/llvm/lib/Transforms/CMakeLists.txt 
        add_subdirectory(LoopCntr)

step 3

    rebuild your llvm-project

step 4

    run the pass with following command
        $ PathToLLVMProject/build/bin/opt -load \
            PathToLLVMProject/build/lib/LLVMLoopCntr.so \
            -CountLoops < file.bc > /dev/null

About

learn LLVM (SPLab )

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published