Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: README.rst

Issue 205613002: Initial skeleton of Subzero. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Use non-anonymous structs so that array_lengthof works Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Makefile ('k') | src/IceCfg.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Subzero - Fast code generator for PNaCl bitcode
2 ===============================================
3
4 Building
5 --------
6
7 You must have LLVM trunk source code available and built. See
8 http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary for
9 guidance.
10
11 Set variables ``LLVM_SRC_PATH`` and ``LLVM_BIN_PATH`` to point to the
12 appropriate directories in the LLVM source and build directories. These can be
13 set as environment variables, or you can modify the top-level Makefile.
14
15 Run ``make`` at the top level to build the main target ``llvm2ice``.
16
17 ``llvm2ice``
18 ------------
19
20 The ``llvm2ice`` program uses the LLVM infrastructure to parse an LLVM bitcode
21 file and translate it into ICE. It then invokes ICE's translate method to lower
22 it to target-specific machine code, dumping the IR at various stages of the
23 translation.
24
25 The program can be run as follows::
26
27 ../llvm2ice ./ir_samples/<file>.ll
28 ../llvm2ice ./tests_lit/llvm2ice_tests/<file>.ll
29
30 At this time, ``llvm2ice`` accepts a few arguments:
31
32 ``-help`` -- Show available arguments and possible values.
33
34 ``-notranslate`` -- Suppress the ICE translation phase, which is useful if
35 ICE is missing some support.
36
37 ``-target=<TARGET>`` -- Set the target architecture. The default is x8632,
38 and x8632fast (generate x8632 code as fast as possible at the cost of code
39 quality) is also available. Future targets include x8664, arm32, and arm64.
40
41 ``-verbose=<list>`` -- Set verbosity flags. This argument allows a
42 comma-separated list of values. The default is ``none``, and the value
43 ``inst,pred`` will roughly match the .ll bitcode file. Of particular use
44 are ``all`` and ``none``.
45
46 See ir_samples/README.rst for more details.
47
48 Running the test suite
49 ----------------------
50
51 Subzero uses the LLVM ``lit`` testing tool for its test suite, which lives in
52 ``tests_lit``. To execute the test suite, first build Subzero, and then run::
53
54 python <path_to_lit.py> -sv tests_lit
55
56 ``path_to_lit`` is the direct path to the lit script in the LLVM source
57 (``$LLVM_SRC_PATH/utils/lit/lit.py``).
58
59 The above ``lit`` execution also needs the LLVM binary path in the
60 ``LLVM_BIN_PATH`` env var.
61
62 Assuming the LLVM paths are set up, ``make check`` is a convenient way to run
63 the test suite.
64
65 Assembling ``llvm2ice`` output
66 ------------------------------
67
68 Currently ``llvm2ice`` produces textual assembly code in a structure suitable
69 for input to ``llvm-mc`` and currently using "intel" assembly syntax. The first
70 line of output is a convenient comment indicating how to pipe the output to
71 ``llvm-mc`` to produce object code.
OLDNEW
« no previous file with comments | « Makefile ('k') | src/IceCfg.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698