No description, website, or topics provided.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
autoconf Drop 'svn' suffix from version. Jan 13, 2016
bindings Deprecate a few C APIs. Dec 18, 2015
cmake Merging r260641: Feb 12, 2016
docs Merge remote-tracking branch 'llvm-mirror/release_38' into 38_merge Aug 3, 2016
examples Fix examples corresponding to r257302. Jan 11, 2016
include Merge remote-tracking branch 'llvm-mirror/release_38' into 38_merge Aug 3, 2016
lib Remove .DS_Store files Oct 16, 2016
projects [CMake] Disable adding the test suite as a projects subdirectory Oct 28, 2015
resources In MSVC builds embed a VERSIONINFO resource in our exe and DLL files. Jun 12, 2015
test Merging r268295: Jun 4, 2016
tools Merging r260703: Feb 12, 2016
unittests Fix PointerIntPair so that it can use an enum class as its integer te… Jan 13, 2016
utils Merging r257663: Jun 4, 2016
.arcconfig Updated phabricator server. Apr 7, 2014
.clang-format Test commit. Mar 2, 2014
.clang-tidy adding readability-identifier-naming to llvm clang-tidy configuration. Dec 8, 2015
.gitignore Merge branch 'release_37' into leg_for_release_37 Sep 7, 2015
CMakeLists.txt Merge remote-tracking branch 'llvm-mirror/release_38' into 38_merge Aug 3, 2016
CODE_OWNERS.TXT The PS4 baton passes. Dec 19, 2015
CREDITS.TXT [WebAssembly] Initial WebAssembly backend Jun 29, 2015
LICENSE.TXT Update for a new year. Mar 12, 2015
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO Oct 2, 2013
Makefile [configure/make] Propagate names of build host tools when making Buil… Mar 25, 2014
Makefile.common Makefile.common: Update a description, s/Source/SOURCES/ , according … Dec 7, 2012
Makefile.config.in We're actually -Wmissing-field-initializers clean thanks to the cmake Aug 7, 2015
Makefile.rules Create Makefile variables for 'share' and 'libexec' Nov 9, 2015
README.txt Merge remote-tracking branch 'llvm-mirror/release_38' into 38_merge Aug 3, 2016
configure Drop 'svn' suffix from version. Jan 13, 2016
llvm.spec.in [Sparc] Implement i64 load/store support for 32-bit sparc. Aug 10, 2015

README.txt

LEG Example Backend
===================

This is a simple example LLVM backend for an ARM-like architecture: 'LEG'.

Check out the slides from the tutorial given at Euro LLVM Developers' Conference 2014, Edinburgh:
    http://llvm.org/devmtg/2014-04/PDFs/Talks/Building%20an%20LLVM%20backend.pdf

Look out for us at the USA LLVM Developers' Conference, October 28-29, San Jose:
    http://llvm.org/devmtg/2014-10/


Fraser Cormack & Pierre-André Saulais, Codeplay Software

Getting Started
===============

The LEG repositories (llvm-leg, clang-leg) both track tip, and aren't tied to any specific revision of LLVM/Clang.

Tried & tested build systems:
*  CMake
Tried & tested compilers:
*  gcc 4.9.1
*  clang 3.5

Building with in-tree clang (optional)
--------------------------------------

    cd llvm-leg
    git clone git@github.com:codeplaysoftware/clang-leg.git tools/clang

Building with make
------------------

    cd llvm-leg
    mkdir build && cd build
    cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=DEBUG(/RELEASE) -DLLVM_TARGETS_TO_BUILD:STRING=LEG(,X86,...) ../
    make -j9

Building with ninja
-------------------

    cd llvm-leg
    mkdir build && cd build
    cmake -G "Ninja" -DCMAKE_BUILD_TYPE:STRING=DEBUG(/RELEASE) -DLLVM_TARGETS_TO_BUILD:STRING=LEG(,X86,...) ../
    ninja


Compiling some code
-------------------

    cd llvm-leg

    ### Compile IR -> Assembly ###
    ./build/bin/llc -march leg -o ex1.s docs/Codeplay/examples/ex1.ll
    cat ex1.s

    ### Compile IR -> ELF Object File ###
    ./build/bin/llc -march leg -filetype=obj -o ex1.o docs/Codeplay/examples/ex1.ll
    xxd ex1.o

    ### Compile Source -> Assembly with in-tree clang (via clang-leg) ###
    ./build/bin/clang -cc1 -triple leg-unknown-unknown -S -o ex1.s docs/Codeplay/example/ex1.c
    cat ex1.s

    ### Compile Source -> Assembly with in-tree clang (via clang-leg) ###
    ./build/bin/clang -cc1 -triple leg-unknown-unknown -o ex1.o docs/Codeplay/example/ex1.c
    xxd ex1.0

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.