• Home
  • Raw
  • Download

Lines Matching +full:clang +full:- +full:o3 +full:- +full:o0

5 Introduction - Got bugs?
21 Once you have a reduced test-case, go to `the LLVM Bug Tracking System
24 the "new-bugs" category if you're not sure). The bug description should
28 * The reduced test-case that triggers the bug.
39 More often than not, bugs in the compiler cause it to crash---often due to
41 is to figure out if it is crashing in the GCC front-end or if it is one of
45 To figure out which component is crashing (the front-end, optimizer or code
46 generator), run the ``clang`` command line as you were when the crash
49 * ``-O0 -emit-llvm``: If ``clang`` still crashes when passed these
51 is in the front-end. Jump ahead to the section on :ref:`front-end bugs
52 <front-end>`.
54 * ``-emit-llvm``: If ``clang`` crashes with this option (which disables
56 `compile-time optimization bugs`_.
61 .. _front-end bug:
62 .. _front-end:
64 Front-end bugs
65 --------------
67 If the problem is in the front-end, you should re-run the same ``clang``
68 command that resulted in the crash, but add the ``-save-temps`` option.
72 you passed to ``clang``, and a brief description of the error it caused.
81 .. _compile-time optimization bugs:
83 Compile-time optimization bugs
84 ------------------------------
86 If you find that a bug crashes in the optimizer, compile your test-case to a
87 ``.bc`` file by passing "``-emit-llvm -O0 -c -o foo.bc``".
90 .. code-block:: bash
92 opt -O3 -debug-pass=Arguments foo.bc -disable-output
95 then it should crash in the same way as clang. If it doesn't crash, please
96 follow the instructions for a `front-end bug`_.
101 .. code-block:: bash
112 -------------------
114 If you find a bug that crashes clang in the code generator, compile your
115 source file to a .bc file by passing "``-emit-llvm -c -o foo.bc``" to
116 clang (in addition to the options you already pass). Once your have
120 #. ``llc foo.bc -relocation-model=pic``
121 #. ``llc foo.bc -relocation-model=static``
123 If none of these crash, please follow the instructions for a `front-end
128 #. ``bugpoint -run-llc foo.bc``
129 #. ``bugpoint -run-llc foo.bc --tool-args -relocation-model=pic``
130 #. ``bugpoint -run-llc foo.bc --tool-args -relocation-model=static``
141 If clang successfully produces an executable, but that executable
154 .. code-block:: bash
156 bugpoint -run-llc [... optzn passes ...] file-to-test.bc --args -- [program arguments]
166 Similarly to debugging incorrect compilation by mis-behaving passes, you
176 .. code-block:: bash
178 bugpoint -run-jit -output=[correct output file] [bitcode file] \
179 --tool-args -- [arguments to pass to lli] \
180 --args -- [program arguments]
184 .. code-block:: bash
186 bugpoint -run-llc -output=[correct output file] [bitcode file] \
187 --tool-args -- [arguments to pass to llc] \
188 --args -- [program arguments]
192 debug the JIT, LLC, and CBE, using the pre-written Makefile targets, which
195 .. code-block:: bash
198 make bugpoint-jit
203 mis-codegenerates, and thus causes the error.
210 .. code-block:: bash
212 llc -march=c safe.bc -o safe.c
213 gcc -shared safe.c -o safe.so
218 .. code-block:: bash
220 llc test.bc -o test.s
221 gcc test.s safe.so -o test.llc
227 .. code-block:: bash
229 lli -load=safe.so test.bc [program options]