docs: Delete incorrect code generation section of HowToSubmitABug (#182315)
I've never used this. Based on the description here, I'm assuming it relied on the C backend, which was removed in 2012.
This commit is contained in:
parent
6fdbcf68ba
commit
c3745fe4ea
1 changed files with 0 additions and 68 deletions
|
|
@ -247,71 +247,3 @@ resulting error.
|
|||
|
||||
The :doc:`OptBisect <OptBisect>` page shows an alternative method for finding
|
||||
incorrect optimization passes.
|
||||
|
||||
Incorrect code generation
|
||||
=========================
|
||||
|
||||
Similarly to debugging incorrect compilation by mis-behaving passes, you
|
||||
can debug incorrect code generation by either LLC or the JIT, using
|
||||
``bugpoint``. The process ``bugpoint`` follows in this case is to try to
|
||||
narrow the code down to a function that is miscompiled by one or the other
|
||||
method, but since for correctness, the entire program must be run,
|
||||
``bugpoint`` will compile the code it deems to not be affected with the C
|
||||
Backend, and then link in the shared object it generates.
|
||||
|
||||
To debug the JIT:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
bugpoint -run-jit -output=[correct output file] [bitcode file] \
|
||||
--tool-args -- [arguments to pass to lli] \
|
||||
--args -- [program arguments]
|
||||
|
||||
Similarly, to debug the LLC, one would run:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
bugpoint -run-llc -output=[correct output file] [bitcode file] \
|
||||
--tool-args -- [arguments to pass to llc] \
|
||||
--args -- [program arguments]
|
||||
|
||||
**Special note:** if you are debugging MultiSource or SPEC tests that
|
||||
already exist in the ``llvm/test`` hierarchy, there is an easier way to
|
||||
debug the JIT, LLC, and CBE, using the pre-written Makefile targets, which
|
||||
will pass the program options specified in the Makefiles:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd llvm/test/../../program
|
||||
make bugpoint-jit
|
||||
|
||||
At the end of a successful ``bugpoint`` run, you will be presented
|
||||
with two bitcode files: a *safe* file which can be compiled with the C
|
||||
backend and the *test* file which either LLC or the JIT
|
||||
mis-codegenerates, and thus causes the error.
|
||||
|
||||
To reproduce the error that ``bugpoint`` found, it is sufficient to do
|
||||
the following:
|
||||
|
||||
#. Regenerate the shared object from the safe bitcode file:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
llc -march=c safe.bc -o safe.c
|
||||
gcc -shared safe.c -o safe.so
|
||||
|
||||
#. If debugging LLC, compile test bitcode native and link with the shared
|
||||
object:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
llc test.bc -o test.s
|
||||
gcc test.s safe.so -o test.llc
|
||||
./test.llc [program options]
|
||||
|
||||
#. If debugging the JIT, load the shared object and supply the test
|
||||
bitcode:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
lli -load=safe.so test.bc [program options]
|
||||
|
|
|
|||
Loading…
Reference in a new issue