Files
swift-mirror/test/SILOptimizer/ome_ignore_stdlib.sil
Michael Gottesman c749f37e80 [ownership] Add new OwnershipEliminatorPass that does not run when the current module is the stdlib.
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.
2020-06-09 13:55:02 -07:00

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 : $()
}