Skip to content

[ownership] update let properties opts to support ossa #29738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 28, 2020

Conversation

zoecarver
Copy link
Contributor

This patch is a bit of an experiment for me. It updates "let-properties-opt" to support OSSA. I realize that this patch will require a lot of work from others (knowledge transfer, etc.). Given that, if you ask me to close this patch, I will happily do that, and I will not take it personally.

With that out of the way, here's the first of what will certainly be many more questions: is this a good pass to have updated? Given that passes before it require non-ossa sil, this pass may not receive ossa sil for a while (other than through sil-opt).

If you want to continue with this patch, I will write many more ossa sil tests.

cc @atrick @gottesmm

@zoecarver zoecarver requested a review from atrick February 10, 2020 07:10
@atrick
Copy link
Contributor

atrick commented Feb 15, 2020

@gottesmm how do you want to proceed?
I think this pass will receive OSSA SIL when building the stdlib. That said, what's a good criteria for saying a pass "handles" OSSA?

  1. Not crashing in the current pipeline (building stdlib)
  2. copying all existing unit tests to OSSA form.

But it's probably worth digging in a little more before giving a pass the OSSA badge. I would suggest temporarily modifying the pipeline and gathering results from the benchmarks and also SCK if possible
Run 1: Run the ownership eliminator just before the first run of this pass.
Run 2: Run the ownership eliminator just after the first run of this pass.

Verify the pipeline is doing what you expect: in both cases assert that all functions are in OSSA at the expect point.

Assuming nothing crashes in run 2, count and compare the number of times the optimization kicked in. If they're they same then I'd say this passes muster.

@zoecarver
Copy link
Contributor Author

@atrick sounds good to me! I've verified that this works with the buildbot preset (which means the stdlib / benchmarks compile / run). I've updated the pass / pipeline to run the ownership eliminator after this pass and updated the pass to count how many functions it changes and write that to a file. I'm running the buildbot preset again with that change now and I'll run it again after I update the pipeline to add the eliminator before this pass. Then, I can get compare the total functions changed on both (which should be the same, as you said). I'll report back later today after those things have completed.

Verify the pipeline is doing what you expect: in both cases assert that all functions are in OSSA at the expect point.

What do you mean by this? In the first case, the functions should never be in OSSA, right?

@gottesmm
Copy link
Contributor

This is running significantly later than where ossa is for the stdlib. I have not began that work. So, I am happy if you want to update this to ossa, but it needs to keep working on non-ossa as well. My suggestion is to rather than replacing all the things, introduce ossa versions of each of the tests.

@zoecarver
Copy link
Contributor Author

Sounds good. I'll move both these tests to _ossa and bring back the old test.

Still in the process of generating the numbers from the comments above. I originally also thought that OSSA wouldn't make it to this part of the pass pipeline but, after I added the ossa elimination pass, I started getting errors in the inliner (because an ossa function was being inlined into a non-ossa function or visa-versa) which leads me to believe that ossa does get to that part of the pipeline. Anyway, I was able to resolve the issues and am re-running the build script now.

What are your thoughts on adding an ossa fuzzer? In the near future, these passes won't see much ossa code so, in order to make sure they continue to function (not crash/misscompile) we could run them on a bunch of ossa sil code. If you're interested I can work on a patch.

@gottesmm
Copy link
Contributor

@zoecarver this pass properly is running on transparent functions that are still in ossa. I would prefer not to optimize those since we are going to inline them.

@zoecarver
Copy link
Contributor Author

I'll try to investigate this a bit tomorrow. When building the stdlib/benchmarks 165 functions were changed by this pass. After adding OwnershipModelEliminator at the beginning of the pipeline, only 142 were changed.

@zoecarver
Copy link
Contributor Author

@gottesmm to clarify, you're asking that I add a check for transparent functions and ignore them?

@gottesmm
Copy link
Contributor

No, what I am saying is that is most likely the source of why you are seeing ossa issues there. Given that it is transparent functions, I don't think adding ossa support now really matters since we are going to inline those transparent functions most likely anyways.

The pathway forward for OSSA is first I am going to move the stdlib to run before serialization at -O with OSSA and then everyone else. This is due to serialization issues. Until that happens you will only see transparent ossa functions in the optimizer pipeline.

@zoecarver
Copy link
Contributor Author

@gottesmm alrighty. I see what you're saying. Like I said in my initial comment, if you don't want to proceed with this patch, that's completely OK with me (or wait until after you flip the switch on the stdlib). We could also merge this knowing it won't do anything until later.

The ownership eliminator doesn't modify transparent functions so, that's most likely the reason for the difference in the number of functions changed.

@atrick
Copy link
Contributor

atrick commented Feb 18, 2020

My suggestions for testing OSSA migration are based on the idea that we can serialize the stdlib in OSSA form. I thought that was working, at least for experimental purposes, but maybe not?

@gottesmm
Copy link
Contributor

@atrick We do not serialize it in that form today. Only transparent functions. That being said, I think this patch is fine as long as it bails on transparent functions.

I will have to do this work anyways and doing this type of transformation (converting the pass to support OSSA/non-OSSA and adding an ossa version of the test) is the first part of that work I would do anyways.

When I get around to moving ownership back through the opt pipeline further towards serialization I will remove the transparent thing. I just want to move ownership lowering backwards pass by pass.

@zoecarver
Copy link
Contributor Author

I just want to move ownership lowering backwards pass by pass.

In subsequent patches, I can help do this by prioritizing passes towards the start of the pass line, if that would be better.

@gottesmm
Copy link
Contributor

That would be great!

@zoecarver
Copy link
Contributor Author

No rush reviewing but, just so I am clear, are there currently any action items for me on this patch?

@atrick
Copy link
Contributor

atrick commented Feb 25, 2020

/cc @gottesmm

Hey @zoecarver ,

Thanks again for doing this!

I agree that this first OSSA conversion step is useful and sufficient for merging a PR; namely:

  • identify any lit unit tests tht invoke this pass
  • copy the test into an _ossa variant, and migrate that test to OSSA

However, the lit tests are extremely weak in terms of coverage of SIL patterns. The majority of work that was historically done in the optimizer never had .sil unit tests. By being just a little more proactive up-front, we can save time debugging random issues in the future.

Before declaring a pass "OSSA-compatible". As a second step, I suggest running the pass over the stdlib and benchmarks builds with assertions enabled. There's nothing to actually commit here; this is purely for one-shot testing purposes, but I think it is worth doing and doesn't take long.

First, you can try running the pass just after OwnershipEliminator:

--- a/lib/SILOptimizer/PassManager/PassPipeline.cpp
+++ b/lib/SILOptimizer/PassManager/PassPipeline.cpp
@@ -114,6 +114,8 @@ static void addMandatoryOptPipeline(SILPassPipelinePlan &P) {
}
if (!Options.StripOwnershipAfterSerialization)
P.addOwnershipModelEliminator();

  • //!!! temporary for testing stdlib/benchmark asserts build
  • P.addLetPropertiesOpt();
    P.addMandatoryInlining();
    P.addMandatorySILLinker();

Just build the stdlib, overlays and Swift benchmarks--you can ignore the lit unit tests for this experiment. For extra credit, you can insert a counter or trace how many times the optimization kicks in.

Assuming that works (it appears to work fine for LetPropertiesOpt), then move the pass to just before the OwnershipModelEliminator. Rebuild the stdlib, overlays, and benchmarks, now with your pass running OSSA. Look for:

  • no assertions firing when moving to OSSA (and the ownership verifier
    passes after running your pass)

  • if possible, compare the number of optimizations before/after moving
    to OSSA. They should be the same.

You could do this experiment in a WIP PR commit if you want, but, again none of it gets checked in.

This is obviously not a perfect experiment, because some optimizations won't kick in until other passes have run first, but I think it's an easy way to catch common issues up front.

@zoecarver
Copy link
Contributor Author

@atrick great, thank you for that message. The step-by-step is really helpful. I'm running the build now, as you specified, with the counting code from before.

With the exception of #30025 in the future, I'll just be moving back from where we currently stop supporting ownership (the next one is TempRValueOptPass). Then the tests should be easier because the pass will almost always be getting ossa.

@zoecarver
Copy link
Contributor Author

Actually, one question: what do you mean overlays? Currently, I'm just running ninja swift-benchmark-macosx-x86_64.

@zoecarver
Copy link
Contributor Author

When the pass is after ownership elimination: 62 functions are changed.
When the pass comes before ownership elimination: 162 functions are changed.

As you can probably see, there's a difference there. I'll run them again tonight to verify that those numbers are actually the case and if so, I'll try to look into the reason for the difference tomorrow.

@atrick
Copy link
Contributor

atrick commented Feb 26, 2020

@zoecarver without any special build-script options, the stdlib, overlays, and benchmarks are built by default. So just running "ninja" should do it. The overlays are all the .swiftmodules and .dylibs built in swift-macosx-x86_64/lib/swift/macosx, in addition to the stdlib (Swift.swiftmodule/libswiftCore.dylib). The most important probably being Darwin and Foundation.

@atrick
Copy link
Contributor

atrick commented Feb 26, 2020

The discrepancy is strange. You can compare the output of '-Xllvm -debug-only=let-properties-opt'

@zoecarver
Copy link
Contributor Author

@atrick thanks for all the help with this. Sorry for the delayed reply, I've been unfortunately busy with other things this week. I think I was cleaning my build targets incorrectly and that is the cause for the difference I saw earlier. Anyway, I just generated the following numbers and function lists.

Pass after ownership elimination

funcs changed: 160 transparent: 2
Changed functions
$s9SwiftLang17SourceKitdRequestV5ArrayCAEycfc
$s9SwiftLang17SourceKitdRequestV5ArrayC3addyySSF
$s9SwiftLang17SourceKitdRequestV5ArrayC3addyySiF
$s9SwiftLang17SourceKitdRequestV5ArrayC3addyyAA0cD3UIDVF
$s9SwiftLang17SourceKitdRequestV5ArrayC3addyyAC10DictionaryCF
$s9SwiftLang17SourceKitdRequestV17addArrayParameteryAC0G0CAA0cD3UIDVF
$s9SwiftLang17SourceKitdRequestV017addCompilerArgsToE0yySaySSGSg_SSSgtF
$s9SwiftLang17SourceKitdRequestV5ArrayCAEycfC
$s9SwiftLang17SourceKitdRequestV5ArrayCAEycfc
$s9SwiftLang17SourceKitdRequestV17addArrayParameteryAC0G0CAA0cD3UIDVF
$s9SwiftLang17SourceKitdRequestV017addCompilerArgsToE0yySaySSGSg_SSSgtF
$s10Foundation8IndexSetV9RangeViewV2eeoiySbAE_AEtFZ
$s10Foundation8IndexSetV9RangeViewV05startB0Sivg
$s10Foundation8IndexSetV9RangeViewV05indexC012intersectingAeC_SnySiGSgtc33_2D7761BAEB66DCEF0A109CF42C1440A7LlfC
$s10Foundation8IndexSetV9RangeViewV05indexC012intersectingAeC_SnySiGSgtc33_2D7761BAEB66DCEF0A109CF42C1440A7LlfC
$s10Sim2DArray010workload_2B4TestyyAA7Array2DVzF
$s11StaticArray04run_aB0yySiF
$s11StaticArrayAAVyAByxG6ElemTyQzcfC
$s11StaticArrayAAVyxGSlAASl10startIndex0D0QzvgTW
$s11StaticArray04run_aB0yySiF
$s11StaticArrayAAVyAByxG6ElemTyQzcfC
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s11DriverUtils10TestRunnerC16startMeasurement33_F2CCF8ACE393C50ECC13382F64935240LLyyF
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s11DriverUtils10TestRunnerC16startMeasurement33_F2CCF8ACE393C50ECC13382F64935240LLyyF
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s9NopDeinit1XCyACyxGxcfcSi_Tg5
$s9NopDeinit1XCfd
$s9NopDeinit1XCyACyxGxcfcSi_Tg5
globalinit_33_18BD82EBBFFB4B27F88553961C03C9F1_func0
$s11Breadcrumbs10UTF16ToIdxC5setUpyyF
$s11Breadcrumbs10IdxToUTF16C5setUpyyF
$s11Breadcrumbs15UTF16ToIdxRangeC5setUpyyF
$s11Breadcrumbs15IdxToUTF16RangeC5setUpyyF
$s11Breadcrumbs18CopyUTF16CodeUnitsC5setUpyyF
$s11Breadcrumbs17MutatedUTF16ToIdxC5setUpyyF
$s11Breadcrumbs17MutatedIdxToUTF16C5setUpyyF
globalinit_33_18BD82EBBFFB4B27F88553961C03C9F1_func0
$s9NopDeinit04run_aB0yySiF
$s9NopDeinit1XCfd
$s9NopDeinit04run_aB0yySiF
$s16PolymorphicCalls1AC4run1SiyF
$s16PolymorphicCalls1AC4run2SiyF
$s16PolymorphicCalls1BC2f1SiyF
$s16PolymorphicCalls1BC2f2SiyF
$s16PolymorphicCalls1BC2f3SiyF
$s16PolymorphicCalls1BC3runSiyF
$s16PolymorphicCalls4testys5Int64VAA1AC_SitF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func1
$s16PolymorphicCalls2C1C2f1SiyF
$s16PolymorphicCalls2C1C2f2SiyF
$s16PolymorphicCalls2C1C2f3SiyF
$s16PolymorphicCalls2C1C2f1SiyFAA2B1CADSiyFTV
$s16PolymorphicCalls2C1C2f2SiyFAA2B1CADSiyFTV
$s16PolymorphicCalls2C1C2f3SiyFAA2B1CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func2
$s16PolymorphicCalls2C2C2f1SiyF
$s16PolymorphicCalls2C2C2f2SiyF
$s16PolymorphicCalls2C2C2f3SiyF
$s16PolymorphicCalls2C2C2f1SiyFAA2B2CADSiyFTV
$s16PolymorphicCalls2C2C2f2SiyFAA2B2CADSiyFTV
$s16PolymorphicCalls2C2C2f3SiyFAA2B2CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func3
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func4
$s16PolymorphicCalls2D2C2f1SiyF
$s16PolymorphicCalls2D2C2f2SiyF
$s16PolymorphicCalls2D2C2f3SiyF
$s16PolymorphicCalls2D2C2f1SiyFAA2B2CADSiyFTV
$s16PolymorphicCalls2D2C2f2SiyFAA2B2CADSiyFTV
$s16PolymorphicCalls2D2C2f3SiyFAA2B2CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func5
$s16PolymorphicCalls2C3C2f1SiyF
$s16PolymorphicCalls2C3C2f2SiyF
$s16PolymorphicCalls2C3C2f3SiyF
$s16PolymorphicCalls2C3C2f1SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2C3C2f2SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2C3C2f3SiyFAA2B3CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func6
$s16PolymorphicCalls2D3C2f1SiyF
$s16PolymorphicCalls2D3C2f2SiyF
$s16PolymorphicCalls2D3C2f3SiyF
$s16PolymorphicCalls2D3C2f1SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2D3C2f2SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2D3C2f3SiyFAA2B3CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func7
$s16PolymorphicCalls2E3C2f1SiyF
$s16PolymorphicCalls2E3C2f2SiyF
$s16PolymorphicCalls2E3C2f3SiyF
$s16PolymorphicCalls2E3C2f1SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2E3C2f2SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2E3C2f3SiyFAA2B3CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func8
$s16PolymorphicCalls2F3C2f1SiyF
$s16PolymorphicCalls2F3C2f2SiyF
$s16PolymorphicCalls2F3C2f3SiyF
$s16PolymorphicCalls2F3C2f1SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2F3C2f2SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2F3C2f3SiyFAA2B3CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func9
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func1
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func2
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func3
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func4
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func5
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func6
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func7
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func8
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func9
$s10Sim2DArray010workload_2B4TestyyAA7Array2DVzF
$s11StaticArray04run_aB0yySiF
$s11StaticArrayAAVyAByxG6ElemTyQzcfC
$s11StaticArrayAAVyxGSlAASl10startIndex0D0QzvgTW
$s11StaticArray04run_aB0yySiF
$s11StaticArrayAAVyAByxG6ElemTyQzcfC
$s16PolymorphicCalls1AC4run1SiyF
$s16PolymorphicCalls1BC2f1SiyF
$s16PolymorphicCalls1BC2f2SiyF
$s16PolymorphicCalls1BC2f3SiyF
$s16PolymorphicCalls1BC3runSiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func1
$s16PolymorphicCalls2C1C2f1SiyF
$s16PolymorphicCalls2C1C2f2SiyF
$s16PolymorphicCalls2C1C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func2
$s16PolymorphicCalls2C2C2f1SiyF
$s16PolymorphicCalls2C2C2f2SiyF
$s16PolymorphicCalls2C2C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func3
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func4
$s16PolymorphicCalls2D2C2f1SiyF
$s16PolymorphicCalls2D2C2f2SiyF
$s16PolymorphicCalls2D2C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func5
$s16PolymorphicCalls2C3C2f1SiyF
$s16PolymorphicCalls2C3C2f2SiyF
$s16PolymorphicCalls2C3C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func6
$s16PolymorphicCalls2D3C2f1SiyF
$s16PolymorphicCalls2D3C2f2SiyF
$s16PolymorphicCalls2D3C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func7
$s16PolymorphicCalls2E3C2f1SiyF
$s16PolymorphicCalls2E3C2f2SiyF
$s16PolymorphicCalls2E3C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func8
$s16PolymorphicCalls2F3C2f1SiyF
$s16PolymorphicCalls2F3C2f2SiyF
$s16PolymorphicCalls2F3C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func9
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func1
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func2
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func3
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func4
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func5
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func6
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func7
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func8
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func9
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s11DriverUtils10TestRunnerC16startMeasurement33_F2CCF8ACE393C50ECC13382F64935240LLyyF
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc

Pass before ownership elimination

funcs changed: 160 transparent: 2
Changed functions
$s9SwiftLang17SourceKitdRequestV5ArrayCAEycfc
$s9SwiftLang17SourceKitdRequestV5ArrayC3addyySSF
$s9SwiftLang17SourceKitdRequestV5ArrayC3addyySiF
$s9SwiftLang17SourceKitdRequestV5ArrayC3addyyAA0cD3UIDVF
$s9SwiftLang17SourceKitdRequestV5ArrayC3addyyAC10DictionaryCF
$s9SwiftLang17SourceKitdRequestV17addArrayParameteryAC0G0CAA0cD3UIDVF
$s9SwiftLang17SourceKitdRequestV017addCompilerArgsToE0yySaySSGSg_SSSgtF
$s9SwiftLang17SourceKitdRequestV5ArrayCAEycfC
$s9SwiftLang17SourceKitdRequestV5ArrayCAEycfc
$s9SwiftLang17SourceKitdRequestV17addArrayParameteryAC0G0CAA0cD3UIDVF
$s9SwiftLang17SourceKitdRequestV017addCompilerArgsToE0yySaySSGSg_SSSgtF
$s10Foundation8IndexSetV9RangeViewV2eeoiySbAE_AEtFZ
$s10Foundation8IndexSetV9RangeViewV05startB0Sivg
$s10Foundation8IndexSetV9RangeViewV05indexC012intersectingAeC_SnySiGSgtc33_2D7761BAEB66DCEF0A109CF42C1440A7LlfC
$s10Foundation8IndexSetV9RangeViewV05indexC012intersectingAeC_SnySiGSgtc33_2D7761BAEB66DCEF0A109CF42C1440A7LlfC
globalinit_33_18BD82EBBFFB4B27F88553961C03C9F1_func0
$s11Breadcrumbs10UTF16ToIdxC5setUpyyF
$s11Breadcrumbs10IdxToUTF16C5setUpyyF
$s11Breadcrumbs15UTF16ToIdxRangeC5setUpyyF
$s11Breadcrumbs15IdxToUTF16RangeC5setUpyyF
$s11Breadcrumbs18CopyUTF16CodeUnitsC5setUpyyF
$s11Breadcrumbs17MutatedUTF16ToIdxC5setUpyyF
$s11Breadcrumbs17MutatedIdxToUTF16C5setUpyyF
globalinit_33_18BD82EBBFFB4B27F88553961C03C9F1_func0
$s9NopDeinit04run_aB0yySiF
$s9NopDeinit1XCfd
$s9NopDeinit04run_aB0yySiF
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s11DriverUtils10TestRunnerC16startMeasurement33_F2CCF8ACE393C50ECC13382F64935240LLyyF
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s16PolymorphicCalls1AC4run1SiyF
$s16PolymorphicCalls1AC4run2SiyF
$s16PolymorphicCalls1BC2f1SiyF
$s16PolymorphicCalls1BC2f2SiyF
$s16PolymorphicCalls1BC2f3SiyF
$s16PolymorphicCalls1BC3runSiyF
$s16PolymorphicCalls4testys5Int64VAA1AC_SitF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func1
$s16PolymorphicCalls2C1C2f1SiyF
$s16PolymorphicCalls2C1C2f2SiyF
$s16PolymorphicCalls2C1C2f3SiyF
$s16PolymorphicCalls2C1C2f1SiyFAA2B1CADSiyFTV
$s16PolymorphicCalls2C1C2f2SiyFAA2B1CADSiyFTV
$s16PolymorphicCalls2C1C2f3SiyFAA2B1CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func2
$s16PolymorphicCalls2C2C2f1SiyF
$s16PolymorphicCalls2C2C2f2SiyF
$s16PolymorphicCalls2C2C2f3SiyF
$s16PolymorphicCalls2C2C2f1SiyFAA2B2CADSiyFTV
$s16PolymorphicCalls2C2C2f2SiyFAA2B2CADSiyFTV
$s16PolymorphicCalls2C2C2f3SiyFAA2B2CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func3
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func4
$s16PolymorphicCalls2D2C2f1SiyF
$s16PolymorphicCalls2D2C2f2SiyF
$s16PolymorphicCalls2D2C2f3SiyF
$s16PolymorphicCalls2D2C2f1SiyFAA2B2CADSiyFTV
$s16PolymorphicCalls2D2C2f2SiyFAA2B2CADSiyFTV
$s16PolymorphicCalls2D2C2f3SiyFAA2B2CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func5
$s16PolymorphicCalls2C3C2f1SiyF
$s16PolymorphicCalls2C3C2f2SiyF
$s16PolymorphicCalls2C3C2f3SiyF
$s16PolymorphicCalls2C3C2f1SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2C3C2f2SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2C3C2f3SiyFAA2B3CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func6
$s16PolymorphicCalls2D3C2f1SiyF
$s16PolymorphicCalls2D3C2f2SiyF
$s16PolymorphicCalls2D3C2f3SiyF
$s16PolymorphicCalls2D3C2f1SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2D3C2f2SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2D3C2f3SiyFAA2B3CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func7
$s16PolymorphicCalls2E3C2f1SiyF
$s16PolymorphicCalls2E3C2f2SiyF
$s16PolymorphicCalls2E3C2f3SiyF
$s16PolymorphicCalls2E3C2f1SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2E3C2f2SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2E3C2f3SiyFAA2B3CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func8
$s16PolymorphicCalls2F3C2f1SiyF
$s16PolymorphicCalls2F3C2f2SiyF
$s16PolymorphicCalls2F3C2f3SiyF
$s16PolymorphicCalls2F3C2f1SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2F3C2f2SiyFAA2B3CADSiyFTV
$s16PolymorphicCalls2F3C2f3SiyFAA2B3CADSiyFTV
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func9
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func1
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func2
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func3
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func4
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func5
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func6
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func7
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func8
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func9
$s10Sim2DArray010workload_2B4TestyyAA7Array2DVzF
$s11StaticArray04run_aB0yySiF
$s11StaticArrayAAVyAByxG6ElemTyQzcfC
$s11StaticArrayAAVyxGSlAASl10startIndex0D0QzvgTW
$s11StaticArray04run_aB0yySiF
$s11StaticArrayAAVyAByxG6ElemTyQzcfC
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s11DriverUtils10TestRunnerC16startMeasurement33_F2CCF8ACE393C50ECC13382F64935240LLyyF
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s16PolymorphicCalls1AC4run1SiyF
$s16PolymorphicCalls1BC2f1SiyF
$s16PolymorphicCalls1BC2f2SiyF
$s16PolymorphicCalls1BC2f3SiyF
$s16PolymorphicCalls1BC3runSiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func1
$s16PolymorphicCalls2C1C2f1SiyF
$s16PolymorphicCalls2C1C2f2SiyF
$s16PolymorphicCalls2C1C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func2
$s16PolymorphicCalls2C2C2f1SiyF
$s16PolymorphicCalls2C2C2f2SiyF
$s16PolymorphicCalls2C2C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func3
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func4
$s16PolymorphicCalls2D2C2f1SiyF
$s16PolymorphicCalls2D2C2f2SiyF
$s16PolymorphicCalls2D2C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func5
$s16PolymorphicCalls2C3C2f1SiyF
$s16PolymorphicCalls2C3C2f2SiyF
$s16PolymorphicCalls2C3C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func6
$s16PolymorphicCalls2D3C2f1SiyF
$s16PolymorphicCalls2D3C2f2SiyF
$s16PolymorphicCalls2D3C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func7
$s16PolymorphicCalls2E3C2f1SiyF
$s16PolymorphicCalls2E3C2f2SiyF
$s16PolymorphicCalls2E3C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func8
$s16PolymorphicCalls2F3C2f1SiyF
$s16PolymorphicCalls2F3C2f2SiyF
$s16PolymorphicCalls2F3C2f3SiyF
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func9
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func1
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func2
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func3
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func4
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func5
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func6
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func7
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func8
globalinit_33_06B01AE54E0D27A09E9CFEDB6354C500_func9
$s9NopDeinit1XCyACyxGxcfcSi_Tg5
$s9NopDeinit1XCfd
$s9NopDeinit1XCyACyxGxcfcSi_Tg5
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s11DriverUtils10TestRunnerC16startMeasurement33_F2CCF8ACE393C50ECC13382F64935240LLyyF
$s11DriverUtils10TestRunnerCyAcA0C6ConfigVcfc
$s11StaticArray04run_aB0yySiF
$s11StaticArrayAAVyAByxG6ElemTyQzcfC
$s11StaticArrayAAVyxGSlAASl10startIndex0D0QzvgTW
$s11StaticArray04run_aB0yySiF
$s11StaticArrayAAVyAByxG6ElemTyQzcfC
$s10Sim2DArray010workload_2B4TestyyAA7Array2DVzF

More important is this: no assertions or errors :)

@zoecarver
Copy link
Contributor Author

I can push the code that used to generate the above data to this PR if you want but like you said because it won't ultimately get committed, I don't think it makes a lot of sense.

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zoecarver thanks! I also didn't see any errors when I built the stdlib with LetProperties + OSSA.

You don't need to post the experiment, I just think it's a good sanity check to catch any issues while the code is fresh in our minds.

@atrick
Copy link
Contributor

atrick commented Feb 27, 2020

@zoecarver please request commit access if you haven't yet
https://swift.org/contributing/#contributing-code
See "Commit Access"

@atrick
Copy link
Contributor

atrick commented Feb 27, 2020

@swift-ci test

@atrick
Copy link
Contributor

atrick commented Feb 27, 2020

@swift-ci benchmark

@swift-ci
Copy link
Contributor

Performance: -O

Code size: -O

Performance: -Osize

Regression OLD NEW DELTA RATIO
FlattenListFlatMap 6111 6931 +13.4% 0.88x (?)

Code size: -Osize

Performance: -Onone

Code size: -swiftlibs

How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@atrick atrick merged commit 631555a into swiftlang:master Feb 28, 2020
@zoecarver
Copy link
Contributor Author

@atrick thanks again for the help with this patch. Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants