Skip to content

rishodamin/VectorOpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LoopUnrollPass

This project implements a custom LLVM compiler pass that performs loop unrolling optimizations at the Intermediate Representation (IR) level. The pass is built using LLVM's new PassManager infrastructure.

πŸ›  Features

  • Identifies and unrolls simple loops in LLVM IR.
  • Designed for experimentation and learning about compiler optimizations.
  • Cleanly integrates with LLVM as a dynamically loadable pass.

πŸ“ Project Structure

LoopUnrollPassProject/
β”œβ”€β”€ CMakeLists.txt          # Build configuration using CMake
└── LoopUnrollPass.cpp      # Custom LLVM pass implementation

πŸ”§ Build Instructions

Prerequisites

  • LLVM and Clang installed (LLVM 12 or later recommended)
  • CMake 3.10 or newer
  • A C++ compiler (e.g., clang++ or g++)

Steps

git clone https://github.com/your-username/LoopUnrollPass.git
cd LoopUnrollPass
mkdir build
cd build
cmake ..
make

This will build the LoopUnrollPass as a shared object (.so or .dylib).

πŸ§ͺ Running the Pass

You can apply the pass to an LLVM IR file:

opt -load-pass-plugin ./LoopUnrollPass.so -passes=loop-unroll -disable-output < input.ll

Note: Make sure the LLVM tools like opt and clang are in your PATH.

πŸ“š References

πŸ§‘β€πŸ’» Author

Damin Risho J V

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors