Skip to content

llvmpy/llcc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Low-Level C Compiler (LLCC)

A llvmpy extension for building C ABI comformant LLVM IR.

Status

On hold. It is a lot harder than I thought and it will take a lot of time.
Hoping LLVM will put some of the ABI stuffs into LLVM itself and not in clang.

Why?

LLVM provides a machine abstraction but not ABI abstaction, which is dependant on language, operating system and processor architecture. This package aims to solve the ABI problem and provide convenient codegen features for building common operations following the C specification.

The Development Plan

The typesystem in LLVM provides machine types. It is too low-level to carry sufficient information for generating proper ABI for the C language. LLCC implements a minimal C typesystem. Remember, there are more than one mapping from a C type to a LLVM machine type. To comform to the C-ABI, there will be precall, postcall, prologue and epilogue code to pack/unpack arguments.

Limitations

  • No support for bit-fields

About

(Experimental) Low-Level C Compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published