Files
swift-mirror/lib/SILOptimizer/PassManager/PassManager.cpp
Mark Lacey 572fe662d5 Add two helpful command-line options for debugging function passes.
This commit adds -sil-break-on-function and -sil-break-on-pass, both
-Xllvm options.

-sil-break-on-function stops function pass execution in the debugger
 just prior to running each function pass on a particular function.

-sil-break-on-pass stops function pass execution in the debugger just
 prior to running a particular pass on each function.

Used together, you can break just prior running a particular pass on a
particular function.

For example:
  xcrun lldb -- $(/path/to/my/swiftc -c -O problem.swift -###) -Xllvm -sil-break-on-function=_TF7problem7problemFT_T_ -Xllvm -sil-break-on-pass='Simplify CFG'

Now when running under the debugger, we'll stop execution just prior
to each run of Simplify CFG on the function problem() in
problem.swift.
2016-03-10 21:42:43 -08:00

26 KiB