Need help with mapping-high-level-constructs-to-llvm-ir?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

f0rki
373 Stars 37 Forks Other 95 Commits 13 Opened issues

Description

A guide that explains how high level programming language constructs are mapped to the LLVM intermediate language.

Services available

!
?

Need anything else?

Contributors list

# 26,126
Shell
gtk
assembl...
disasse...
63 commits
# 218,075
Less
TeX
Telegra...
command...
7 commits
# 108,891
Shell
pattern...
syntax-...
sed
2 commits
# 105,798
Rust
Shell
consens...
elm
1 commit
# 11,523
C++
indexed...
Chrome
Electro...
1 commit
# 42,507
C
Shell
unicorn...
afl
1 commit

Mapping High Level Constructs to LLVM IR

Click here to read the book on
readthedocs.org 
__

About

This is a gitbook dedicated to providing a description on how LLVM based compilers map high-level language constructs into the LLVM intermediate representation (IR).

This document targets people interested in how modern compilers work and want to learn how high-level language constructs can be implemented. Currently the books focuses on C and C++, but contributions about other languages targeting LLVM are highly welcome. This document should help to make the learning curve less steep for aspiring LLVM users.

For the sake of simplicity, we'll be working with a 32-bit target machine so that pointers and word-sized operands are 32-bits. Also, for the sake of readability we do not mangle (encode) names. Rather, they are given simple, easy-to-read names that reflect their purpose. A production compiler for any language that supports overloading would generally need to mangle the names so as to avoid conflicts between symbols.

Contributing

The repository for this document is hosted on

github 
. All contributions are welcome. If you find an error file an
Issue 
or fork the repository
and create a
pull-request 
__.

License

UNLESS OTHERWISE NOTED, THE CONTENTS OF THIS REPOSITORY/DOCUMENT ARE LICENSED UNDER THE CREATIVE COMMONS ATTRIBUTION - SHARE ALIKE 4.0 INTERNATIONAL LICENSE

.. figure:: https://i.creativecommons.org/l/by-sa/4.0/88x31.png :alt: https://creativecommons.org/licenses/by-sa/4.0/

https://creativecommons.org/licenses/by-sa/4.0/

.. toctree:: :maxdepth: 1 :caption: Contents:

a-quick-primer/index basic-constructs/index control-structures/index object-oriented-constructs/index exception-handling/index advanced-constructs/index interoperating-with-a-runtime-library/index interfacing-to-the-operating-system/index epilogue/index appendix-a-how-to-implement-a-string-type-in-llvm/index

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.