File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
lib/SILOptimizer/PassManager Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -738,6 +738,11 @@ it's quite easy to do this manually:
738
738
the sub-pass number. The option ` -Xllvm -sil-opt-pass-count=<n>.<m> `
739
739
can be used for that, where ` m ` is the sub-pass number.
740
740
741
+ For bisecting pass counts in large projects, the pass counts can be read from
742
+ a configuration file using the ` -Xllvm -sil-pass-count-config-file=<file> `
743
+ option. For details see the comment for ` SILPassCountConfigFile ` in the pass
744
+ manager sources.
745
+
741
746
### Using git-bisect in the presence of branch forwarding/feature branches
742
747
743
748
` git-bisect ` is a useful tool for finding where a regression was
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ llvm::cl::opt<std::string> SILNumOptPassesToRun(
71
71
72
72
// Read pass counts for each module from a config file.
73
73
// Config file format:
74
- // <module-name>:<pass-count>(.<sub-pass-count>)
74
+ // <module-name>:<pass-count>(.<sub-pass-count>)?
75
75
//
76
76
// This is useful for bisecting passes in large projects:
77
77
// 1. create a config file from a full build log. E.g. with
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ _swift_complete()
8
8
local tool currentWord prevWord
9
9
10
10
tool=" ${COMP_WORDS[0]} "
11
+ if alias " $tool " > /dev/null; then
12
+ tool=` alias " $tool " | sed " s/.*'\\ (.*\\ )'.*/\\ 1/" `
13
+ fi
14
+
11
15
currentWord=" ${COMP_WORDS[COMP_CWORD]} "
12
16
prevWord=" ${COMP_WORDS[COMP_CWORD-1]} "
13
17
@@ -92,6 +96,7 @@ _swift_complete()
92
96
-sil-lower-agg-instrs-expand-all \
93
97
-sil-merge-stack-slots \
94
98
-sil-opt-pass-count \
99
+ -sil-pass-count-config-file \
95
100
-sil-opt-remark-ignore-always-infer \
96
101
-sil-optimized-access-markers \
97
102
-sil-ownership-verifier-enable-testing \
You can’t perform that action at this time.
0 commit comments