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:
738738 the sub-pass number. The option ` -Xllvm -sil-opt-pass-count=<n>.<m> `
739739 can be used for that, where ` m ` is the sub-pass number.
740740
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+
741746### Using git-bisect in the presence of branch forwarding/feature branches
742747
743748` 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(
7171
7272// Read pass counts for each module from a config file.
7373// Config file format:
74- // <module-name>:<pass-count>(.<sub-pass-count>)
74+ // <module-name>:<pass-count>(.<sub-pass-count>)?
7575//
7676// This is useful for bisecting passes in large projects:
7777// 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()
88 local tool currentWord prevWord
99
1010 tool=" ${COMP_WORDS[0]} "
11+ if alias " $tool " > /dev/null; then
12+ tool=` alias " $tool " | sed " s/.*'\\ (.*\\ )'.*/\\ 1/" `
13+ fi
14+
1115 currentWord=" ${COMP_WORDS[COMP_CWORD]} "
1216 prevWord=" ${COMP_WORDS[COMP_CWORD-1]} "
1317
@@ -92,6 +96,7 @@ _swift_complete()
9296 -sil-lower-agg-instrs-expand-all \
9397 -sil-merge-stack-slots \
9498 -sil-opt-pass-count \
99+ -sil-pass-count-config-file \
95100 -sil-opt-remark-ignore-always-infer \
96101 -sil-optimized-access-markers \
97102 -sil-ownership-verifier-enable-testing \
You can’t perform that action at this time.
0 commit comments