Skip to content

duplicate invoke expr during call method splitting #22481

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 2 commits into from
Jun 28, 2017
Merged

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Jun 22, 2017

With the new gc-rooting pass, this should generate better code over the copying of just the method instance.

@quinnj
Copy link
Member

quinnj commented Jun 23, 2017

Will this help the inlining issue I reported in #22097?

@vtjnash
Copy link
Member Author

vtjnash commented Jun 23, 2017

This does the transform mentioned at #22097 (comment) so it no longer needs to be done manually.

@vtjnash vtjnash force-pushed the jn/split-invoke branch 2 times, most recently from f299e73 to 4315b7a Compare June 23, 2017 06:10
@vtjnash
Copy link
Member Author

vtjnash commented Jun 23, 2017

@nanosoldier runbenchmarks(ALL, vs = ":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels

@vtjnash
Copy link
Member Author

vtjnash commented Jun 24, 2017

forget to update the inliner heuristics for the new code structure. lets try that again: @nanosoldier runbenchmarks(ALL, vs = ":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels

@vtjnash
Copy link
Member Author

vtjnash commented Jun 25, 2017

Alright, the performance changes here are now unhelpfully coupled due to its affect on inlining. But I don't see anything that seems broken.

@tkelman
Copy link
Contributor

tkelman commented Jun 25, 2017

what does "unhelpfully coupled" mean?

@KristofferC
Copy link
Member

That performance changes are because of the different inlining heuristics and not what the PR is actually fixing?

@tkelman
Copy link
Contributor

tkelman commented Jun 25, 2017

How about adding a test for the fix then?

@timholy
Copy link
Member

timholy commented Jun 25, 2017

The linalg/givens failure was one I hit in #22210 and is the issue addressed by #22516; I'm surprised the last commit doesn't fix it, but rebasing on #22516 might be an easy fix.

@timholy
Copy link
Member

timholy commented Jun 25, 2017

Oh, and the regressions in the "issorted" benchmarks are presumably fixed (twice 😄) in #22210; I don't see anything here performance-wise that you need to worry about. Nice improvements here!

@vtjnash
Copy link
Member Author

vtjnash commented Jun 26, 2017

what does "unhelpfully coupled" mean?

Almost all of the difference are attributable to getting the inlining decision wrong (#22210), but neither the old nor the new is consistently better. But some of the differences (at least one improvement – raytrace) are real.

How about adding a test for the fix then?

The PR doesn't fix anything. It's just a more concise and readable way to implement this, and moves us closer to a very-linear-ir (so that flipping that switch will have a smaller impact).

vtjnash added 2 commits June 26, 2017 12:23
With the new gc-rooting pass, this should generate better code
over the copying of just the method instance.
these aren't usually performance-sensitive functions,
and llvm is more likely to miscompile them when these functions get large
@vtjnash
Copy link
Member Author

vtjnash commented Jun 26, 2017

Removed the inlining changes, so hopefully this PR will not be unhelpfully coupled anymore: @nanosoldier runbenchmarks(ALL, vs = ":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels

@vtjnash
Copy link
Member Author

vtjnash commented Jun 28, 2017

Looks excellent. Will merge tomorrow if there's no comments.

@tkelman
Copy link
Contributor

tkelman commented Jun 28, 2017

many of the nullable operations got considerably slower, is this inhibiting simd?

@vtjnash
Copy link
Member Author

vtjnash commented Jun 28, 2017

Those functions don't run this codepath, and are generating the same IR when I examined them locally. Not sure why they are showing up noisy here.

@martinholters
Copy link
Member

They're not the usual suspects for being (that) noisy, so @nanosoldier runbenchmarks(ALL, vs = ":master") again.

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels

@tkelman
Copy link
Contributor

tkelman commented Jun 28, 2017

Good enough for me, sqrtm is a frequently noisy one

@vtjnash vtjnash merged commit 7dcfea8 into master Jun 28, 2017
@vtjnash vtjnash deleted the jn/split-invoke branch June 28, 2017 23:28
@Keno
Copy link
Member

Keno commented Jun 28, 2017

The nullable operations had gotten faster on master.

@tkelman
Copy link
Contributor

tkelman commented Jun 29, 2017

nanosoldier should be building the merge commit though so that shouldn't make a difference

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.

8 participants