[PATCH] D35058: [docs] Document how to debug instruction scheduling model generation
Joel Jones via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 6 07:58:41 PDT 2017
joelkevinjones created this revision.
Describe how to:
+ Gather exact tablegen command
+ Use tablegen command with debug option for subtarget generation
+ Use schedcover.py on the debug output
Repository:
rL LLVM
https://reviews.llvm.org/D35058
Files:
docs/WritingAnLLVMBackend.rst
Index: docs/WritingAnLLVMBackend.rst
===================================================================
--- docs/WritingAnLLVMBackend.rst
+++ docs/WritingAnLLVMBackend.rst
@@ -1012,6 +1012,35 @@
by TableGen in XXXGenInstrInfo.inc. The name of the schedule classes are
the same as provided in XXXSchedule.td plus a default NoItinerary class.
+The schedule models are generated by TableGen by the SubtargetEmitter,
+using the ``CodeGenSchedModels`` class. The tool ``utils/schedcover.py``
+can be used to determine which instructions have been covered by the
+schedule model description and which haven't. The first step is to use the
+instructions below to create an output file. Then run ``schedcover.py`` on the
+output file:
+
+.. code-block:: shell
+
+ $ utils/schedcover.py build/lib/Target/AArch64/tblGenSubtarget.with
+ instruction, default, CortexA53Model, CortexA57Model, CycloneModel, ExynosM1Model, FalkorModel, KryoModel, ThunderX2T99Model, ThunderXT8XModel
+ ABSv16i8, WriteV, , , CyWriteV3, M1WriteNMISC1, FalkorWr_2VXVY_2cyc, KryoWrite_2cyc_XY_XY_150ln, ,
+ ABSv1i64, WriteV, , , CyWriteV3, M1WriteNMISC1, FalkorWr_1VXVY_2cyc, KryoWrite_2cyc_XY_noRSV_67ln, ,
+ ...
+
+To capture the debug output from generating a schedule model, capture the
+exact TableGen command from a build by using:
+
+.. code-block:: shell
+
+ $ VERBOSE=1 make ...
+
+Then change to the appropriate target directory and re-issue the TableGen
+command with the ``subtarget-emitter`` debug option:
+
+.. code-block:: shell
+
+ $ ../../../bin/llvm-tblgen -debug-only=subtarget-emitter -gen-subtarget ...
+
Instruction Relation Mapping
----------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35058.105430.patch
Type: text/x-patch
Size: 1667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170706/38a3a4a9/attachment.bin>
More information about the llvm-commits
mailing list