mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-26 11:25:27 +00:00
5d71fc5d7b
This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.com/llvm-project/ reviews.llvm.org/diffusion/ to instead point to https://github.com/llvm/llvm-project. This is *not* a trivial substitution, because additionally, all the checkout instructions had to be migrated to instruct users on how to use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of checking out various projects into various subdirectories. I've attempted to not change any scripts here, only documentation. The scripts will have to be addressed separately. Additionally, I've deleted one document which appeared to be outdated and unneeded: lldb/docs/building-with-debug-llvm.txt Differential Revision: https://reviews.llvm.org/D57330 llvm-svn: 352514
57 lines
2.4 KiB
ReStructuredText
57 lines
2.4 KiB
ReStructuredText
==================================================
|
|
Tips and Tricks on using and contributing to Polly
|
|
==================================================
|
|
|
|
Commiting to polly trunk
|
|
------------------------
|
|
- `General reference to git-svn workflow <https://stackoverflow.com/questions/190431/is-git-svn-dcommit-after-merging-in-git-dangerous>`_
|
|
|
|
|
|
Using bugpoint to track down errors in large files
|
|
--------------------------------------------------
|
|
|
|
If you know the ``opt`` invocation and have a large ``.ll`` file that causes
|
|
an error, ``bugpoint`` allows one to reduce the size of test cases.
|
|
|
|
The general calling pattern is:
|
|
|
|
- ``$ bugpoint <file.ll> <pass that causes the crash> -opt-args <opt option flags>``
|
|
|
|
An example invocation is:
|
|
|
|
- ``$ bugpoint crash.ll -polly-codegen -opt-args -polly-canonicalize -polly-process-unprofitable``
|
|
|
|
For more documentation on bugpoint, `Visit the LLVM manual <http://llvm.org/docs/Bugpoint.html>`_
|
|
|
|
|
|
Understanding which pass makes a particular change
|
|
--------------------------------------------------
|
|
|
|
If you know that something like `opt -O3 -polly` makes a change, but you wish to
|
|
isolate which pass makes a change, the steps are as follows:
|
|
|
|
- ``$ bugpoint -O3 file.ll -opt-args -polly`` will allow bugpoint to track down the pass which causes the crash.
|
|
|
|
To do this manually:
|
|
|
|
- ``$ opt -O3 -polly -debug-pass=Arguments`` to get all passes that are run by default. ``-debug-pass=Arguments`` will list all passes that have run.
|
|
- Bisect down to the pass that changes it.
|
|
|
|
|
|
Debugging regressions introduced at some unknown earlier point
|
|
--------------------------------------------------------------
|
|
|
|
In case of a regression in performance or correctness (e.g., an earlier version
|
|
of Polly behaved as expected and a later version does not), bisecting over the
|
|
version history is the standard approach to identify the commit that introduced
|
|
the regression.
|
|
|
|
LLVM has a single repository that contains all projects. It can be cloned at:
|
|
`<https://github.com/llvm/llvm-project>`_. How to bisect on a
|
|
git repository is explained here
|
|
`<https://www.metaltoad.com/blog/beginners-guide-git-bisect-process-elimination>`_.
|
|
The bisect process can also be automated as explained here:
|
|
`<https://www.metaltoad.com/blog/mechanizing-git-bisect-bug-hunting-lazy>`_.
|
|
An LLVM specific run script is available here:
|
|
`<https://gist.github.com/dcci/891cd98d80b1b95352a407d80914f7cf>`_.
|