Commit Graph

15 Commits

Author SHA1 Message Date
Erik Eckstein
04a6bbbb7a docs: add documentation for the -sil-pass-count-config-file option in DebuggingTheCompiler
Also, add this option in swift-autocomplete.bash.
Unrelated: support aliased commands in swift-autocomplete.bash
2024-01-11 11:10:05 +01:00
Erik Eckstein
2384a0c6f4 Optimizer: remove the now unused LSLocation utilities 2023-07-21 07:19:56 +02:00
Erik Eckstein
d25b1ed834 Optimizer: Replace the MandatoryCombine pass with a Simplification pass, which is implemented in Swift
The Swift Simplification pass can do more than the old MandatoryCombine pass: simplification of more instruction types and dead code elimination.
The result is a better -Onone performance while still keeping debug info consistent.

Currently following code patterns are simplified:
* `struct` -> `struct_extract`
* `enum` -> `unchecked_enum_data`
* `partial_apply` -> `apply`
* `br` to a 1:1 related block
* `cond_br` with a constant condition
* `isConcrete` and `is_same_metadata` builtins

More simplifications can be added in the future.

rdar://96708429
rdar://104562580
2023-02-09 06:50:05 +01:00
Erik Eckstein
8828d8e6bf tests: clean-up MemBehavior tests
Add more relevant instructions to dump in MemBehaviorDumper.
Therefore the -enable-mem-behavior-dump-all option can be removed.
Also mem-behavior-all.sil into mem-behavior.sil, because the sil-opt command lines don't differ anymore.
2021-03-24 11:19:00 +01:00
Andrew Trick
1fa76ba811 swift-autocomplete.bash, rename 'options' for zsh compat 2021-02-27 22:29:49 -08:00
Andrew Trick
74ad3e0a4e Add swift-frontend to the autocomplete command set. 2021-02-27 21:05:01 -08:00
Erik Eckstein
8dfd2491a8 swift-autocomplete.bash: add the missing -Xllvm -sil-print-function option 2021-02-26 16:07:48 +01:00
Erik Eckstein
6e04ef9542 swift-autocomplete.bash: update the hard coded list of -Xllvm options 2021-02-22 13:02:50 +01:00
Erik Eckstein
658d11c042 swift-autocomplete.bash: fix filename completion
Completion of filenames didn't add a "/" when pressing TAB.
2021-02-22 13:02:50 +01:00
Erik Eckstein
ee5491a7c9 PassManager: simplify the options to print intermediate SIL.
* rename -sil-print-only-function to -sil-print-function and -sil-print-only-functions to -sil-print-functions
* to print single functions, don't require -Xllvm -sil-print-all. It's now sufficient to use e.g. -Xllvm -sil-print-function=<f>
But it's still possible to select functions with -sil-print-function(s) for other print options, -sil-print-after.
2021-02-09 09:12:06 +01:00
Erik Eckstein
61f2e7b793 SILVerifier: remove the unused -verify-skip-unreachable-must-be-last option
It had no effect, because such SIL is never generated anyway.
2020-09-11 11:09:29 +02:00
Andrew Trick
e8d3ee11eb Add -sil-inline-never-functions flag.
And fix a test case that assumes Array.append is never inlined.

We need to be able to prevent inlining a function and any of its
specializations. There's no way to specify multiple function names on
the command line, so we use the partial match technique.
2020-03-18 00:36:49 -07:00
Michael Gottesman
aa035e9563 Rename disable-llvm-arc-opts => disable-swift-specific-llvm-optzns and make sure that we actually disable /all/ LLVM passes.
For instance, we were always running merge functions unconditionally if -O was
passed.

rdar://40097698
2018-05-15 16:18:16 -07:00
Bob Wilson
14428834c4 Update some more sil-extract references to the new sil-func-extractor name
Michael renamed this tool and forgot to update these places where the old
name was used.
2016-12-08 21:55:27 -08:00
Erik Eckstein
067cbce8a2 A bash script for auto-completion of swift command line options and ninja build targets.
After 'source'ing this script you will have auto-completion for the swift compiler options and for other swift tools and for ninja build targets.
2015-11-11 10:56:49 -08:00