Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

Malic for compiler 2017

A compiler for the course Compiler 2017 at ACM Class, SJTU.

The source is a java-like language. The target is x86-64 NASM.

With various optimizations, this compiler was ranked first in the performance competition of the course.

Optimization

  • Instruction selection
  • Function inlining
  • Control flow analysis
    • redundant jump elimination
  • Dataflow analysis
    • common sub-expression elimination
    • constant propagation and folding
    • dead code elimination
  • Register Allocation
    • a full implementation of George, Lal; Appel, Andrew W. (May 1996). "Iterated Register Coalescing“

for more details, please refer to my report

Build

bash build.bash

Usage

Usage: java -jar Malic.jar [options]
Options:
  -in   <file> : M* language source code
  -out  <file> : x86-64 NASM output
  -help        : print this help page

About

A compiler for the course Compiler 2017 at ACM Class, SJTU.

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.