This project is part of the Virginia Tech ECE5544 course on Compiler Optimization. We have developed a custom LLVM pass specifically for Conditional Constant Folding. This pass aims to optimize specific conditional constant scenarios within the code, enhancing execution efficiency.
-
Custom LLVM Pass: A specialized Conditional Constant Folding pass designed to optimize conditional constants more effectively within compiled programs.
-
Benchmarking: The implementation has been benchmarked using custom microbenchmarks to demonstrate the effectiveness and impact of the Conditional Constant Folding pass on code optimization.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Ensure you have LLVM installed on your system along with the necessary development tools like make
and clang
.
-
Clone the Repository
Start by cloning this repository on your local machine:
git clone https://github.com/AnantaSrikar/ConstantFolding cd ConstantFolding
-
Compile the LLVM Pass and Benchmarks
Compile the custom LLVM pass along with the necessary benchmarks using:
make
This command builds all required components of the project.
After compiling the components, you can run the benchmarks to see the effects of the Conditional Constant Folding pass:
-
Run the Benchmark
Execute the benchmarks using the provided script:
./run.sh
This script runs the benchmark suite against the LLVM pass, applying the optimizations and outputting the results.
-
Analyzing the Output
Review the output from the benchmark runs to understand the performance and optimization improvements provided by the custom LLVM pass.
To clean up your directory and remove all compiled outputs:
make clean
This command will clean the project directory, ensuring that all build artifacts are removed.
Contributions are welcome from students and faculty. Please fork the repository, make your changes, and submit a pull request for review.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Thanks to Virginia Tech's faculty and ECE5544 course staff and the TA for guidance and support throughout the project!