Skip to content

Prototype prefetch instructions #3467

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
Jan 6, 2021
Merged

Conversation

tlively
Copy link
Member

@tlively tlively commented Jan 6, 2021

As proposed in WebAssembly/simd#352, using the opcodes
used in the LLVM and V8 implementations.

As proposed in WebAssembly/simd#352, using the opcodes
used in the LLVM and V8 implementations.
@tlively tlively requested a review from kripken January 6, 2021 01:22
src/ir/cost.h Outdated
@@ -537,6 +537,7 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, Index> {
Index visitSIMDShuffle(SIMDShuffle* curr) {
return 1 + visit(curr->left) + visit(curr->right);
}
Index visitPrefetch(Prefetch* curr) { return 1 + visit(curr->ptr); }
Copy link
Member

Choose a reason for hiding this comment

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

I doubt it matters, but maybe this could be 0 instead of 1, as it is meant to speed up later things?

default:
return false;
}
auto* curr = allocator.alloc<Prefetch>();
Copy link
Member

Choose a reason for hiding this comment

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

I think it's better to use builder.makePrefetch, that is, to leave the direct allocation to the Builder as much as possible, both here an in the s-parser code.

@tlively tlively merged commit 3d41465 into WebAssembly:master Jan 6, 2021
@tlively tlively deleted the prefetch branch January 6, 2021 19:36
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.

2 participants