mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Hoist alloc_stack instructions of 'generic' or resilient type to the entry block. At the same time also perform a very simple stack coloring analysis. This does not use a true liveness-analysis yet but rather employs some simple conservative checks to see whether the live ranges of two alloc_stacks might interfere. AllocStackHoisting is an IRGen SIL pass. This allows for using IRGen's type lowering information. Furthermore, hoisting and merging the alloc_stack instructions this late does not interfere with SIL optimizations because the resulting SIL never gets serialized.
23 lines
564 B
Swift
23 lines
564 B
Swift
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: %target-build-swift %s -o %t/a.out
|
|
// RUN: not --crash %t/a.out 2>&1 | PYTHONPATH=%lldb-python-path %utils/symbolicate-linux-fatal %t/a.out - | %utils/backtrace-check -u
|
|
// REQUIRES: executable_test
|
|
// REQUIRES: OS=linux-gnu
|
|
// REQUIRES: lldb
|
|
|
|
// Backtraces are not emitted when optimizations are enabled. This test can not
|
|
// run when optimizations are enabled.
|
|
// REQUIRES: swift_test_mode_optimize_none
|
|
|
|
func funcB() {
|
|
fatalError("linux-fatal-backtrace");
|
|
}
|
|
|
|
func funcA() {
|
|
funcB();
|
|
}
|
|
|
|
print("bla")
|
|
funcA()
|