mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
As part of bringing up ossa on the rest of the optimizer, I am going to be first moving ossa back for the stdlib module since the stdlib module does not have any sil based dependencies. To do so, I am adding this pass that I can place at the beginning of the pipeline (where NonTransparentFunctionOwnershipModelEliminator runs today) and then move NonTransparentFunctionOwnershipModelEliminator down as I update passes. If we are processing the stdlib, the ome doesn't run early and instead runs late. If we are not processing the stdlib, we perform first an OME run early and then perform an additional OME run that does nothing since lowering ownership is an idempotent operation.
14 lines
418 B
Plaintext
14 lines
418 B
Plaintext
// RUN: %target-sil-opt -non-stdlib-non-transparent-func-ownership-model-eliminator %s | %FileCheck %s
|
|
// RUN: %target-sil-opt -non-stdlib-non-transparent-func-ownership-model-eliminator %s -module-name Swift | %FileCheck -check-prefix=STDLIB-CHECK %s
|
|
|
|
// CHECK-NOT: [ossa]
|
|
// STDLIB-CHECK: [ossa]
|
|
|
|
sil_stage canonical
|
|
|
|
sil [ossa] @my_ossa : $@convention(thin) () -> () {
|
|
bb0:
|
|
%9999 = tuple()
|
|
return %9999 : $()
|
|
}
|