Skip to content
This repository has been archived by the owner on May 25, 2018. It is now read-only.

Dead Code Elimination & Common Subexpression Elimination. This is the first two homeworks of Advanced Compiler (17' Spring) instructed by Prof. Wei-Chung Hsu.

Notifications You must be signed in to change notification settings

ntu-homeworks/compiler-homeworks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dead Code Elimination & Common Subexpression Elimination

R05944012 Chih-Yung Liang (梁智湧)

Build Instructions

Build LLVM

$ git submodule update --depth 1
$ mkdir env llvm/build && cd llvm/build
$ cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 ..
$ taskset -c 0-17 make -j36
$ cmake -DCMAKE_INSTALL_PREFIX=`pwd`/../../env -P cmake_install.cmake
$ cd ../..

Build This Project

$ export PATH=`pwd`/env/bin:$PATH
$ mkdir build && cd build
$ cmake ..
$ make

Test Results

Assume that Clang is already installed on the system.

$ make DCE-test1
$ make CSE-test-noeffect1
$ make CSE-test-noeffect2
$ make CSE-test-noeffect3
$ make CSE-test-eli-loads1
$ make CSE-test-eli-loads2
$ make CSE-test-eli-loads3
$ make CSE-test-eli-adds1
$ make CSE-test-eli-adds2
$ make CSE-test-eli-adds3
$ make CSE-test-eli-ptr1
$ make CSE-test-eli-ptr2
$ make CSE-test-eli-ptr3
$ make CSE-test-eli-ptr4

About

Dead Code Elimination & Common Subexpression Elimination. This is the first two homeworks of Advanced Compiler (17' Spring) instructed by Prof. Wei-Chung Hsu.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published