Skip to content

MrYar0s/CompilerStudy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CompilerStudy

Repository for compiler course

First task

Second task

Third task

Fourth task

For project configuration execute these commands from this repo root:

mkdir build && cd build

cmake ..

First task

Implemented "Game Of Life" splitted into app library in src/api and src/main.c connected with calculation logic of the application

To run the "Game of Life" run target run_app (make run_app)

Second task

Attention!!! Use Makefile instead of Ninja because of broken dependencies in ninja tool at this part

To see logs in runtime just run target run_managed_app (make run_managed_app)

To collect patterns run target run-get-log (make run-get-log), to make plots with python script run target run-get-statistics (make run-get-statistics), but these proccess will be long

Here you can see plots with patterns which were detected after run app with libLogger.so pass Frequent instructions by group of 1 Frequent instructions by group of 2 Frequent instructions by group of 3 Frequent instructions by group of 4 Frequent instructions by group of 5

Third task

Implemented LLVM IR generator and got output similar like in main.ll

To get generated LLVM IR run target get_llvm_app_ir (make get_llvm_app_ir), to run interpreter run target run_llvm_app (make run_llvm_app)

Fourth task

Developed own ISA (similar to LLVM IR), implemented "Game Of Life" by my ISA. Wrote handlers for all instructions from ISA, developed simulator to run this application. And finaly implemented generation of LLVM IR equivalent of my application, and you able to run interpreter on this LLVM IR.

To see dump of ASM2IR run target dump_asm2ir (make dump_asm2ir)

To run simulator of ASM run target run_asm (make run_asm)

To run interpreter of LLVM IR run target run_ir (make run_ir)

About

Repository for compiler course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published