Skip to content

Commit 18670fc

Browse files
committed
[assembly-vision] Rename opt remark generator to assembly vision remark generator.
TLDR: The reason why I am doing this is that often times people confuse assembly vision remarks for normal opt remarks. I want to accentuate that this is actually trying to do something different than a traditional opt remark. To that end I renamed things in the compiler and added a true attribute `@_assemblyVision` to trigger the compiler to emit these remarks to help everyone remember what this is in their ontology. I explain below the difference. ---- Normal opt remarks work by the optimizer telling you if it succeeded or failed to perform an optimization. Another way of putting this is that opt remarks is trying to give back feedback to the user from an expert system about why it did or not do something. There is inherently an act of interpretation in the optimizer about whether or not to report an 'action' that it perpetrated to the user. Assembly Vision Remarks is instead trying to be an expert tool that acts like an xray. Instead of telling the user about what the optimizer did, it is instead a simple visitor that visits the IR and emits SourceLocations for where specific hazards ending up in the program. In this sense it is just telling the user where certain instructions ended up and using heuristics to relate this to information at the IR level. To a get a sense of this difference, consider the following Swift Code: ``` public class Klass { func doSomething() {} } var global: Klass = Klass() @inline(__always) func bar() -> Klass { global } @_assemblyVision @inline(never) func foo() { bar().doSomething() } ``` In this case, we will emit the following remarks: ``` test.swift:16:5: remark: begin exclusive access to value of type 'Klass' bar().doSomething() ^ test.swift:7:5: note: of 'global' var global: Klass = Klass() ^ test.swift:16:9: remark: end exclusive access to value of type 'Klass' bar().doSomething() ^ test.swift:7:5: note: of 'global' var global: Klass = Klass() ^ test.swift:16:11: remark: retain of type 'Klass' bar().doSomething() ^ test.swift:7:5: note: of 'global' var global: Klass = Klass() ^ test.swift:16:23: remark: release of type 'Klass' bar().doSomething() ^ test.swift:7:5: note: of 'global' var global: Klass = Klass() ^ ``` Notice how the begin/end exclusive access are marked as actually being before the retain, release of global. That seems weird since exclusive access to memory seems like something that should not escape an exclusivity scope... but in fact this corresponds directly to what we eventually see in the SIL: ``` // test.sil sil hidden [noinline] [_semantics "optremark"] @$ss3fooyyF : $@convention(thin) () -> () { bb0: %0 = global_addr @$ss6globals5KlassCvp : $*Klass %1 = begin_access [read] [dynamic] [no_nested_conflict] %0 : $*Klass %2 = load %1 : $*Klass end_access %1 : $*Klass %4 = class_method %2 : $Klass, #Klass.doSomething : (Klass) -> () -> (), $@convention(method) (@guaranteed Klass) -> () strong_retain %2 : $Klass %6 = apply %4(%2) : $@convention(method) (@guaranteed Klass) -> () strong_release %2 : $Klass %8 = tuple () return %8 : $() } // end sil function '$ss3fooyyF' ``` and assembly, ``` // test.S _$ss3fooyyF: pushq %rbp movq %rsp, %rbp pushq %r13 pushq %rbx subq $32, %rsp leaq _$ss6globals5KlassCvp(%rip), %rdi leaq -40(%rbp), %rsi xorl %edx, %edx xorl %ecx, %ecx callq _swift_beginAccess movq _$ss6globals5KlassCvp(%rip), %r13 movq (%r13), %rax movq 80(%rax), %rbx movq %r13, %rdi callq _swift_retain callq *%rbx movq %r13, %rdi callq _swift_release addq $32, %rsp popq %rbx popq %r13 popq %rbp retq ``` so as one can see what we are trying to do is inform the user of hazards in the code without trying to reason about it, automated a task that users often have to perform by hand: inspection of assembly to determine where runtime calls and other hazards ended up.
1 parent e731f01 commit 18670fc

File tree

11 files changed

+68
-64
lines changed

11 files changed

+68
-64
lines changed

include/swift/SILOptimizer/PassManager/Passes.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ PASS(OptimizedMandatoryCombine, "optimized-mandatory-combine",
415415
"Perform -O level mandatory peephole combines")
416416
PASS(BugReducerTester, "bug-reducer-tester",
417417
"sil-bug-reducer Tool Testing by Asserting on a Sentinel Function")
418-
PASS(OptRemarkGenerator, "sil-opt-remark-generator",
419-
"Emit small peephole opt remarks that do not use large analyses")
418+
PASS(AssemblyVisionRemarkGenerator, "assembly-vision-remark-generator",
419+
"Emit assembly vision remarks that provide source level guidance of where runtime calls ended up")
420420
PASS(PruneVTables, "prune-vtables",
421421
"Mark class methods that do not require vtable dispatch")
422422
PASS_RANGE(AllPasses, AADumper, PruneVTables)

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,8 @@ static void addLastChanceOptPassPipeline(SILPassPipelinePlan &P) {
728728
// Only has an effect if the -assume-single-thread option is specified.
729729
P.addAssumeSingleThreaded();
730730

731-
// Only has an effect if opt-remark is enabled.
732-
P.addOptRemarkGenerator();
731+
// Emits remarks on all functions with @_assemblyVision attribute.
732+
P.addAssemblyVisionRemarkGenerator();
733733

734734
// FIXME: rdar://72935649 (Miscompile on combining PruneVTables with WMO)
735735
// P.addPruneVTables();

lib/SILOptimizer/Transforms/OptRemarkGenerator.cpp renamed to lib/SILOptimizer/Transforms/AssemblyVisionRemarkGenerator.cpp

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
//===--- OptRemarkGenerator.cpp -------------------------------------------===//
1+
//===--- AssemblyVisionRemarkGenerator.cpp --------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See https://swift.org/LICENSE.txt for license information
@@ -12,23 +12,23 @@
1212
///
1313
/// \file
1414
///
15-
/// In this pass, we define the opt-remark-generator, a simple SILVisitor that
16-
/// attempts to infer opt-remarks for the user using heuristics.
15+
/// In this pass, we define the assembly-vision-remark-generator, a simple
16+
/// SILVisitor that attempts to infer remarks for the user using heuristics.
1717
///
1818
//===----------------------------------------------------------------------===//
1919

20-
#define DEBUG_TYPE "sil-opt-remark-gen"
20+
#define DEBUG_TYPE "sil-assembly-vision-remark-gen"
2121

2222
#include "swift/AST/SemanticAttrs.h"
2323
#include "swift/Basic/Defer.h"
2424
#include "swift/SIL/DebugUtils.h"
2525
#include "swift/SIL/DynamicCasts.h"
2626
#include "swift/SIL/MemAccessUtils.h"
2727
#include "swift/SIL/OptimizationRemark.h"
28+
#include "swift/SIL/PatternMatch.h"
2829
#include "swift/SIL/Projection.h"
2930
#include "swift/SIL/SILFunction.h"
3031
#include "swift/SIL/SILInstruction.h"
31-
#include "swift/SIL/PatternMatch.h"
3232
#include "swift/SIL/SILModule.h"
3333
#include "swift/SIL/SILVisitor.h"
3434
#include "swift/SILOptimizer/Analysis/RCIdentityAnalysis.h"
@@ -41,13 +41,14 @@ using namespace swift;
4141
using namespace swift::PatternMatch;
4242

4343
static llvm::cl::opt<bool> ForceVisitImplicitAutogeneratedFunctions(
44-
"optremarkgen-visit-implicit-autogen-funcs", llvm::cl::Hidden,
44+
"assemblyvisionremarkgen-visit-implicit-autogen-funcs", llvm::cl::Hidden,
4545
llvm::cl::desc(
4646
"Emit opt remarks even on implicit and autogenerated functions"),
4747
llvm::cl::init(false));
4848

4949
static llvm::cl::opt<bool> DecllessDebugValueUseSILDebugInfo(
50-
"optremarkgen-declless-debugvalue-use-sildebugvar-info", llvm::cl::Hidden,
50+
"assemblyvisionremarkgen-declless-debugvalue-use-sildebugvar-info",
51+
llvm::cl::Hidden,
5152
llvm::cl::desc(
5253
"If a debug_value does not have a decl, infer a value with a name from "
5354
"that info that has a loc set to the loc of the debug_value "
@@ -98,7 +99,8 @@ struct ValueToDeclInferrer {
9899
///
99100
/// sil @theFunction : $@convention(thin) () -> () {
100101
/// bb0:
101-
/// %0 = apply %getKlassPair() : $@convention(thin) () -> @owned KlassPair
102+
/// %0 = apply %getKlassPair() : $@convention(thin) () -> @owned
103+
/// KlassPair
102104
/// // This debug_value's name can be combined...
103105
/// debug_value %0 : $KlassPair, name "myPair"
104106
/// // ... with the access path from the struct_extract here...
@@ -119,8 +121,9 @@ struct ValueToDeclInferrer {
119121
/// //
120122
/// // The reason why we must do this is due to the behavior of the late
121123
/// // optimizer and how it forms these patterns in the code.
122-
/// %0a = apply %getStateWithOwningPointer() : $@convention(thin) () -> @owned StateWithOwningPointer
123-
/// %1 = struct_extract %0a : $StateWithOwningPointer, #StateWithOwningPointer.owningPtr
124+
/// %0a = apply %getStateWithOwningPointer() : $@convention(thin) () ->
125+
/// @owned StateWithOwningPointer %1 = struct_extract %0a :
126+
/// $StateWithOwningPointer, #StateWithOwningPointer.owningPtr
124127
/// strong_retain %1 : $Klass
125128
/// %2 = struct $Array(%0 : $Builtin.NativeObject, ...)
126129
/// debug_value %2 : $Array, ...
@@ -130,7 +133,8 @@ struct ValueToDeclInferrer {
130133

131134
/// Convenience overload that calls:
132135
///
133-
/// printNote(stream, decl->getBaseName().userFacingName(), shouldPrintAccessPath).
136+
/// printNote(stream, decl->getBaseName().userFacingName(),
137+
/// shouldPrintAccessPath).
134138
void printNote(llvm::raw_string_ostream &stream, const ValueDecl *decl,
135139
bool shouldPrintAccessPath = true) {
136140
printNote(stream, decl->getBaseName().userFacingName(),
@@ -308,9 +312,7 @@ bool ValueToDeclInferrer::infer(
308312
SmallVectorImpl<Argument> &resultingInferredDecls,
309313
bool allowSingleRefEltAddrPeek) {
310314
// Clear the stored access path at end of scope.
311-
SWIFT_DEFER {
312-
accessPath.clear();
313-
};
315+
SWIFT_DEFER { accessPath.clear(); };
314316
ValueUseToDeclInferrer valueUseInferrer{
315317
{}, *this, keyKind, resultingInferredDecls};
316318
bool foundSingleRefElementAddr = false;
@@ -379,8 +381,9 @@ bool ValueToDeclInferrer::infer(
379381
// A pattern that we see around empty array storage is:
380382
//
381383
// %0 = global_addr @_swiftEmptyArrayStorage : $*_SwiftEmptyArrayStorage
382-
// %1 = address_to_pointer %0 : $*_SwiftEmptyArrayStorage to $Builtin.RawPointer
383-
// %2 = raw_pointer_to_ref %1 : $Builtin.RawPointer to $__EmptyArrayStorage
384+
// %1 = address_to_pointer %0 : $*_SwiftEmptyArrayStorage to
385+
// $Builtin.RawPointer %2 = raw_pointer_to_ref %1 : $Builtin.RawPointer to
386+
// $__EmptyArrayStorage
384387
//
385388
// Recognize this case.
386389
{
@@ -490,17 +493,18 @@ bool ValueToDeclInferrer::infer(
490493

491494
namespace {
492495

493-
struct OptRemarkGeneratorInstructionVisitor
494-
: public SILInstructionVisitor<OptRemarkGeneratorInstructionVisitor> {
496+
struct AssemblyVisionRemarkGeneratorInstructionVisitor
497+
: public SILInstructionVisitor<
498+
AssemblyVisionRemarkGeneratorInstructionVisitor> {
495499
SILModule &mod;
496500
OptRemark::Emitter ORE;
497501

498502
/// A class that we use to infer the decl that is associated with a
499503
/// miscellaneous SIL value. This is just a heuristic that is to taste.
500504
ValueToDeclInferrer valueToDeclInferrer;
501505

502-
OptRemarkGeneratorInstructionVisitor(SILFunction &fn,
503-
RCIdentityFunctionInfo &rcfi)
506+
AssemblyVisionRemarkGeneratorInstructionVisitor(SILFunction &fn,
507+
RCIdentityFunctionInfo &rcfi)
504508
: mod(fn.getModule()), ORE(DEBUG_TYPE, fn), valueToDeclInferrer(rcfi) {}
505509

506510
void visitStrongRetainInst(StrongRetainInst *sri);
@@ -519,7 +523,7 @@ struct OptRemarkGeneratorInstructionVisitor
519523

520524
} // anonymous namespace
521525

522-
void OptRemarkGeneratorInstructionVisitor::
526+
void AssemblyVisionRemarkGeneratorInstructionVisitor::
523527
visitUnconditionalCheckedCastAddrInst(
524528
UnconditionalCheckedCastAddrInst *uccai) {
525529
ORE.emit([&]() {
@@ -542,8 +546,8 @@ void OptRemarkGeneratorInstructionVisitor::
542546
});
543547
}
544548

545-
void OptRemarkGeneratorInstructionVisitor::visitCheckedCastAddrBranchInst(
546-
CheckedCastAddrBranchInst *ccabi) {
549+
void AssemblyVisionRemarkGeneratorInstructionVisitor::
550+
visitCheckedCastAddrBranchInst(CheckedCastAddrBranchInst *ccabi) {
547551
ORE.emit([&]() {
548552
using namespace OptRemark;
549553
SmallVector<Argument, 8> inferredArgs;
@@ -564,7 +568,7 @@ void OptRemarkGeneratorInstructionVisitor::visitCheckedCastAddrBranchInst(
564568
});
565569
}
566570

567-
void OptRemarkGeneratorInstructionVisitor::visitBeginAccessInst(
571+
void AssemblyVisionRemarkGeneratorInstructionVisitor::visitBeginAccessInst(
568572
BeginAccessInst *bai) {
569573
ORE.emit([&]() {
570574
using namespace OptRemark;
@@ -586,7 +590,7 @@ void OptRemarkGeneratorInstructionVisitor::visitBeginAccessInst(
586590
});
587591
}
588592

589-
void OptRemarkGeneratorInstructionVisitor::visitEndAccessInst(
593+
void AssemblyVisionRemarkGeneratorInstructionVisitor::visitEndAccessInst(
590594
EndAccessInst *eai) {
591595
ORE.emit([&]() {
592596
using namespace OptRemark;
@@ -611,7 +615,7 @@ void OptRemarkGeneratorInstructionVisitor::visitEndAccessInst(
611615
});
612616
}
613617

614-
void OptRemarkGeneratorInstructionVisitor::visitStrongRetainInst(
618+
void AssemblyVisionRemarkGeneratorInstructionVisitor::visitStrongRetainInst(
615619
StrongRetainInst *sri) {
616620
ORE.emit([&]() {
617621
using namespace OptRemark;
@@ -633,7 +637,7 @@ void OptRemarkGeneratorInstructionVisitor::visitStrongRetainInst(
633637
});
634638
}
635639

636-
void OptRemarkGeneratorInstructionVisitor::visitStrongReleaseInst(
640+
void AssemblyVisionRemarkGeneratorInstructionVisitor::visitStrongReleaseInst(
637641
StrongReleaseInst *sri) {
638642
ORE.emit([&]() {
639643
using namespace OptRemark;
@@ -656,7 +660,7 @@ void OptRemarkGeneratorInstructionVisitor::visitStrongReleaseInst(
656660
});
657661
}
658662

659-
void OptRemarkGeneratorInstructionVisitor::visitRetainValueInst(
663+
void AssemblyVisionRemarkGeneratorInstructionVisitor::visitRetainValueInst(
660664
RetainValueInst *rvi) {
661665
ORE.emit([&]() {
662666
using namespace OptRemark;
@@ -677,7 +681,7 @@ void OptRemarkGeneratorInstructionVisitor::visitRetainValueInst(
677681
});
678682
}
679683

680-
void OptRemarkGeneratorInstructionVisitor::visitReleaseValueInst(
684+
void AssemblyVisionRemarkGeneratorInstructionVisitor::visitReleaseValueInst(
681685
ReleaseValueInst *rvi) {
682686
ORE.emit([&]() {
683687
using namespace OptRemark;
@@ -699,7 +703,7 @@ void OptRemarkGeneratorInstructionVisitor::visitReleaseValueInst(
699703
});
700704
}
701705

702-
void OptRemarkGeneratorInstructionVisitor::visitAllocRefInst(
706+
void AssemblyVisionRemarkGeneratorInstructionVisitor::visitAllocRefInst(
703707
AllocRefInst *ari) {
704708
if (ari->canAllocOnStack()) {
705709
return ORE.emit([&]() {
@@ -735,7 +739,7 @@ void OptRemarkGeneratorInstructionVisitor::visitAllocRefInst(
735739
});
736740
}
737741

738-
void OptRemarkGeneratorInstructionVisitor::visitAllocBoxInst(
742+
void AssemblyVisionRemarkGeneratorInstructionVisitor::visitAllocBoxInst(
739743
AllocBoxInst *abi) {
740744
return ORE.emit([&]() {
741745
using namespace OptRemark;
@@ -760,8 +764,8 @@ void OptRemarkGeneratorInstructionVisitor::visitAllocBoxInst(
760764

761765
namespace {
762766

763-
class OptRemarkGenerator : public SILFunctionTransform {
764-
~OptRemarkGenerator() override {}
767+
class AssemblyVisionRemarkGenerator : public SILFunctionTransform {
768+
~AssemblyVisionRemarkGenerator() override {}
765769

766770
bool isOptRemarksEnabled() {
767771
auto *fn = getFunction();
@@ -798,7 +802,7 @@ class OptRemarkGenerator : public SILFunctionTransform {
798802

799803
LLVM_DEBUG(llvm::dbgs() << "Visiting: " << fn->getName() << "\n");
800804
auto &rcfi = *getAnalysis<RCIdentityAnalysis>()->get(fn);
801-
OptRemarkGeneratorInstructionVisitor visitor(*fn, rcfi);
805+
AssemblyVisionRemarkGeneratorInstructionVisitor visitor(*fn, rcfi);
802806
for (auto &block : *fn) {
803807
for (auto &inst : block) {
804808
visitor.visit(&inst);
@@ -809,6 +813,6 @@ class OptRemarkGenerator : public SILFunctionTransform {
809813

810814
} // end anonymous namespace
811815

812-
SILTransform *swift::createOptRemarkGenerator() {
813-
return new OptRemarkGenerator();
816+
SILTransform *swift::createAssemblyVisionRemarkGenerator() {
817+
return new AssemblyVisionRemarkGenerator();
814818
}

lib/SILOptimizer/Transforms/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ target_sources(swiftSILOptimizer PRIVATE
2424
MergeCondFail.cpp
2525
Outliner.cpp
2626
ObjectOutliner.cpp
27-
OptRemarkGenerator.cpp
27+
AssemblyVisionRemarkGenerator.cpp
2828
PerformanceInliner.cpp
2929
PhiArgumentOptimizations.cpp
3030
PruneVTables.cpp

test/SILOptimizer/opt_remark/opt_remark_generator.sil renamed to test/SILOptimizer/assemblyvision_remark/basic.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-sil-opt -sil-opt-remark-ignore-always-infer -optremarkgen-declless-debugvalue-use-sildebugvar-info -sil-opt-remark-generator -sil-remarks-missed=sil-opt-remark-gen -verify %s -o /dev/null
1+
// RUN: %target-sil-opt -sil-opt-remark-ignore-always-infer -assemblyvisionremarkgen-declless-debugvalue-use-sildebugvar-info -assembly-vision-remark-generator -sil-remarks-missed=sil-assembly-vision-remark-gen -verify %s -o /dev/null
22

33
sil_stage canonical
44

test/SILOptimizer/opt_remark/opt_remark_generator.swift renamed to test/SILOptimizer/assemblyvision_remark/basic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-opt-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil %s -o /dev/null -Xfrontend -verify
1+
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-assembly-vision-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil %s -o /dev/null -Xfrontend -verify
22
// REQUIRES: optimized_stdlib,swift_stdlib_no_asserts
33

44
public class Klass {

test/SILOptimizer/opt_remark/opt_remark_generator_yaml.swift renamed to test/SILOptimizer/assemblyvision_remark/basic_yaml.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-opt-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil %s -o /dev/null -Xfrontend -verify
1+
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-assembly-vision-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil %s -o /dev/null -Xfrontend -verify
22

33
// RUN: %empty-directory(%t)
44
// RUN: %target-swiftc_driver -wmo -O -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil -save-optimization-record=yaml -save-optimization-record-path %t/note.yaml %s -o /dev/null && %FileCheck --input-file=%t/note.yaml %s
55

66
// REQUIRES: optimized_stdlib,swift_stdlib_no_asserts
77

88
// This file is testing out the basic YAML functionality to make sure that it
9-
// works without burdening opt_remark_generator_yaml.swift with having to update all
9+
// works without burdening basic_yaml.swift with having to update all
1010
// of the yaml test cases everytime new code is added.
1111

1212
public class Klass {}
1313

1414
// CHECK: --- !Missed
15-
// CHECK-NEXT: Pass: sil-opt-remark-gen
15+
// CHECK-NEXT: Pass: sil-assembly-vision-remark-gen
1616
// CHECK-NEXT: Name: sil.memory
17-
// CHECK-NEXT: DebugLoc: { File: '{{.*}}opt_remark_generator_yaml.swift',
17+
// CHECK-NEXT: DebugLoc: { File: '{{.*}}basic_yaml.swift',
1818
// CHECK-NEXT: Line: [[# @LINE + 7 ]], Column: 21 }
1919
// CHECK-NEXT: Function: main
2020
// CHECK-NEXT: Args:
@@ -25,32 +25,32 @@ public class Klass {}
2525
public var global = Klass() // expected-remark {{heap allocated ref of type 'Klass'}}
2626

2727
// CHECK: --- !Missed
28-
// CHECK-NEXT: Pass: sil-opt-remark-gen
28+
// CHECK-NEXT: Pass: sil-assembly-vision-remark-gen
2929
// CHECK-NEXT: Name: sil.memory
30-
// CHECK-NEXT: DebugLoc: { File: '{{.*}}opt_remark_generator_yaml.swift',
30+
// CHECK-NEXT: DebugLoc: { File: '{{.*}}basic_yaml.swift',
3131
// CHECK-NEXT: Line: [[# @LINE + 27 ]], Column: 12 }
3232
// CHECK-NEXT: Function: 'getGlobal()'
3333
// CHECK-NEXT: Args:
3434
// CHECK-NEXT: - String: 'begin exclusive access to value of type '''
3535
// CHECK-NEXT: - ValueType: Klass
3636
// CHECK-NEXT: - String: ''''
3737
// CHECK-NEXT: - InferredValue: 'of ''global'''
38-
// CHECK-NEXT: DebugLoc: { File: '{{.*}}opt_remark_generator_yaml.swift',
38+
// CHECK-NEXT: DebugLoc: { File: '{{.*}}basic_yaml.swift',
3939
// CHECK-NEXT: Line: [[# @LINE - 14 ]], Column: 12 }
4040
// CHECK-NEXT: ...
4141
//
4242
// CHECK: --- !Missed
43-
// CHECK-NEXT: Pass: sil-opt-remark-gen
43+
// CHECK-NEXT: Pass: sil-assembly-vision-remark-gen
4444
// CHECK-NEXT: Name: sil.memory
45-
// CHECK-NEXT: DebugLoc: { File: '{{.*}}opt_remark_generator_yaml.swift',
45+
// CHECK-NEXT: DebugLoc: { File: '{{.*}}basic_yaml.swift',
4646
// CHECK-NEXT: Line: [[# @LINE + 12]], Column: 5 }
4747
// CHECK-NEXT: Function: 'getGlobal()'
4848
// CHECK-NEXT: Args:
4949
// CHECK-NEXT: - String: 'retain of type '''
5050
// CHECK-NEXT: - ValueType: Klass
5151
// CHECK-NEXT: - String: ''''
5252
// CHECK-NEXT: - InferredValue: 'of ''global'''
53-
// CHECK-NEXT: DebugLoc: { File: '{{.*}}opt_remark_generator_yaml.swift',
53+
// CHECK-NEXT: DebugLoc: { File: '{{.*}}basic_yaml.swift',
5454
// CHECK-NEXT: Line: [[# @LINE - 29 ]], Column: 12 }
5555
// CHECK-NEXT: ...
5656
@inline(never)
@@ -62,9 +62,9 @@ public func getGlobal() -> Klass {
6262
}
6363

6464
// CHECK: --- !Missed
65-
// CHECK-NEXT: Pass: sil-opt-remark-gen
65+
// CHECK-NEXT: Pass: sil-assembly-vision-remark-gen
6666
// CHECK-NEXT: Name: sil.memory
67-
// CHECK-NEXT: DebugLoc: { File: '{{.*}}opt_remark_generator_yaml.swift',
67+
// CHECK-NEXT: DebugLoc: { File: '{{.*}}basic_yaml.swift',
6868
// CHECK-NEXT: Line: [[# @LINE + 23]], Column: 11 }
6969
// CHECK-NEXT: Function: 'useGlobal()'
7070
// CHECK-NEXT: Args:
@@ -73,9 +73,9 @@ public func getGlobal() -> Klass {
7373
// CHECK-NEXT: - String: ''''
7474
// CHECK-NEXT: ...
7575
// CHECK-NEXT: --- !Missed
76-
// CHECK-NEXT: Pass: sil-opt-remark-gen
76+
// CHECK-NEXT: Pass: sil-assembly-vision-remark-gen
7777
// CHECK-NEXT: Name: sil.memory
78-
// CHECK-NEXT: DebugLoc: { File: '{{.*}}opt_remark_generator_yaml.swift',
78+
// CHECK-NEXT: DebugLoc: { File: '{{.*}}basic_yaml.swift',
7979
// CHECK-NEXT: Line: [[# @LINE + 12]], Column: 12 }
8080
// CHECK-NEXT: Function: 'useGlobal()'
8181
// CHECK-NEXT: Args:

test/SILOptimizer/opt_remark/cast_remarks.swift renamed to test/SILOptimizer/assemblyvision_remark/cast_remarks.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-opt-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -emit-sil %s -o /dev/null -Xfrontend -verify
1+
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-assembly-vision-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -emit-sil %s -o /dev/null -Xfrontend -verify
22

33
// REQUIRES: optimized_stdlib
44
// REQUIRES: swift_stdlib_no_asserts

test/SILOptimizer/opt_remark/cast_remarks_objc.swift renamed to test/SILOptimizer/assemblyvision_remark/cast_remarks_objc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-opt-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -emit-sil %s -o /dev/null -Xfrontend -verify
1+
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-assembly-vision-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -emit-sil %s -o /dev/null -Xfrontend -verify
22

33
// REQUIRES: objc_interop
44
// REQUIRES: optimized_stdlib

0 commit comments

Comments
 (0)