@@ -26,12 +26,8 @@ hopefully help fix them/add tests).
26
26
1 . A lot of this code was inspired by llvm's bisect tool. This includes a bit of
27
27
the code style, we should clean this up and pythonify these parts of the
28
28
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.
35
31
3 . Then we need to implement miscompile detection support. This implies
36
32
implementing support for codegening code from this tool using swiftc. This
37
33
implies splitting modules into optimized and unoptimized parts. Luckily,
@@ -60,17 +56,19 @@ Then I invoke the bug reducer as follows:
60
56
--module-name=${MODULE_NAME} \
61
57
--work-dir=${PWD}/bug_reducer \
62
58
--module-cache=${PWD}/bug_reducer/module-cache \
59
+ --reduce-sil \
63
60
${SWIFT_BUILD_DIR} \
64
61
${OUTPUT_SIB}
65
62
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:
69
66
70
- *** Found miscompiling passes !
67
+ *** Successfully Reduced file !
71
68
*** Final File: ${FINAL_SIB_FILE}
72
- *** Final Passes : ${FINAL_PASSES }
69
+ *** Final Functions : ${FINAL_SET_OF_FUNCTIONS }
73
70
*** Repro command line: ${FULL_FINAL_REPRO_CMDLINE}
71
+ *** Final Passes: ${FINAL_PASSES}
74
72
75
73
Some notes:
76
74
0 commit comments