-
Notifications
You must be signed in to change notification settings - Fork 0
rahul27/HashDCE
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
README for the HASH Dead Code Elimination Optimization Created by: Rahul Rudradevan <[email protected]>, University of California - Irvine. This project implements the technique mentioned in "A New Technique for Copy Propagation And Dead Code Elimination Using Hash Based Value Numbering" proposed by Dr. K.V.N.Sunitha and Dr V. Vijaya Kumar: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4289962 These optimizations are built on the LLVM Compiler Infrastructure (http://llvm.org/). Steps to set up LLVM: Follow instructions mentioned in the "Getting Started Quickly (A Summary)" section on the following link to download LLVM and build the compiler: http://llvm.org/releases/3.1/docs/GettingStarted.html Once this is done, an LLVM folder with the compiler build should be created in the user specified directory. Now place the HashDCE folder in the following path $LLVM_ROOT/lib/Transforms. Steps to build and run the optimization: $make This command builds the optimization and creates the library ../../../Debug+Asserts/lib/LLVMHashDCE.so. To test the program generate the bitcode file for the sample program (in Sample/) using the following command: $clang -O0 -emit-llvm Sample/hashdce.c -c -o Sample/hashdce.bc Here make sure that the -O0 optimization is enabled to make sure that LLVM does not run its own dead code or other default optimization algorithms. Finally the bitcode optimized using HashDCE can be obtained using the following command: $opt -load ../../../Debug+Asserts/lib/LLVMHashDCE.so -hashdce < Sample/hashdce.bc > Sample/hashdceopt.bc The example can be run using: $lli Sample/hashdceopt.bc To view the IR (hashdceopt.ll) generated, use the following command: $llvm-dis Sample/hashdceopt.bc This program has been tested and run successfully on Ubuntu 12.04 LTS, 64 bit and LLVM 3.1.
About
Hash Dead Code Elimination
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published