Skip to content

Commit 15afaa9

Browse files
committed
[sil-bug-reducer] Update docs now that we can reduce SIL.
1 parent 3f8a061 commit 15afaa9

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

utils/bug_reducer/README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,8 @@ hopefully help fix them/add tests).
2626
1. A lot of this code was inspired by llvm's bisect tool. This includes a bit of
2727
the code style, we should clean this up and pythonify these parts of the
2828
tool.
29-
2. Once this is done, we should consider implementing function reducing
30-
functionality. We already have sil-func-extractor which can reduce functions
31-
in modules just how a bugpoint tool would like. We should wire up code to use
32-
that tool to reduce functions. After this point, our tool should be good
33-
enough for reducing test cases. Later we can implement block/instruction
34-
extraction, but this is a first step.
29+
2. Reduction at a function level is complete, we should look into block/instruction
30+
reduction techniques to reduce SIL further.
3531
3. Then we need to implement miscompile detection support. This implies
3632
implementing support for codegening code from this tool using swiftc. This
3733
implies splitting modules into optimized and unoptimized parts. Luckily,
@@ -60,17 +56,19 @@ Then I invoke the bug reducer as follows:
6056
--module-name=${MODULE_NAME} \
6157
--work-dir=${PWD}/bug_reducer \
6258
--module-cache=${PWD}/bug_reducer/module-cache \
59+
--reduce-sil \
6360
${SWIFT_BUILD_DIR} \
6461
${OUTPUT_SIB}
6562

66-
Then the bug_reducer will first attempt to reduce the passes. Then (in a future
67-
version), it will attempt to reduce the test case by splitting the module
68-
up. The output will be look something like:
63+
Then the bug_reducer will first attempt to reduce the passes. Then, it will
64+
attempt to reduce the test case by splitting the module and only optimizing part
65+
of it. The output will be look something like:
6966

70-
*** Found miscompiling passes!
67+
*** Successfully Reduced file!
7168
*** Final File: ${FINAL_SIB_FILE}
72-
*** Final Passes: ${FINAL_PASSES}
69+
*** Final Functions: ${FINAL_SET_OF_FUNCTIONS}
7370
*** Repro command line: ${FULL_FINAL_REPRO_CMDLINE}
71+
*** Final Passes: ${FINAL_PASSES}
7472

7573
Some notes:
7674

0 commit comments

Comments
 (0)