Giter Site home page Giter Site logo

kuan-li / ayame Goto Github PK

View Code? Open in Web Editor NEW

This project forked from no-sf-work/ayame

0.0 0.0 0.0 2.35 MB

A compiler that translates SysY (a subset of C language) into ARMv7a, implemented in Java15.

License: Do What The F*ck You Want To Public License

ANTLR 0.91% Java 92.44% Python 5.40% C 0.10% Shell 1.16%

ayame's Introduction

北京航空航天大学 No Segmentation Fault Work 队作品。

ayame

A toy compiler that translates SysY (a subset of C language) into ARMv7a.

ayame

Build

javac -encoding UTF-8 $(find . -name "*.java") -cp lib/antlr4-runtime-4.8.jar:lib/argparse4j-0.9.0.jar

Usage

java -classpath src:lib/antlr4-runtime-4.8.jar:lib/argparse4j-0.9.0.jar Compiler -S {sy_file} -o {asm_file} [-O2]

Architecture

architecture

Passes

  • 中层
    • 全局值编号 (GVN)
    • 全局代码移动 (GCM)
    • 过程内死代码删除
    • 过程间死代码删除
    • 函数内联
    • LCSSA
    • 删除无用循环
    • 循环展开
    • 局部数组提升&标记常量数组
    • 全局变量局部化
    • 分支优化
    • 静态分支预测瞎蒙
    • 归纳变量强度削弱
    • 循环合并
  • 底层
    • Codegen (消除 Phi 指令/除法优化)
    • 图着色寄存器分配
    • 窥孔优化
    • 指令调度
    • 合并基本块(条件执行)

Performance

performance

Special Thank

Special thank to @lynzrand for designing the icon for Ayame.

ayame's People

Contributors

generaluseai avatar codevka avatar roife avatar dglr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.