Skip to content
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

[Arm64] Support table-driven code generation for scalar intrinsics #447

Merged
merged 2 commits into from
Dec 3, 2019

Conversation

echesakov
Copy link
Contributor

Motivation 1: To support table-driven approach during code generation of "simple" scalar intrinsics (the ones that don't require non-trivial instruction lookup or moving the values between operand registers and destination register).

Motivation 2: To support special (non table-driven) codegen of intrinsics with 3 operands (e.g. BitwiseSelect).

When I implemented these logics for scalar intrinsics and 3 operands intrinsics I found that functions CodeGen::genHWIntrinsic and CodeGen::genSpecialIntrinsic have at least 50% of the identical code so I moved the shared preparatory logic (that looks up intrinsic ID and category, the corresponding operand nodes, and base type) to a separate class HWIntrinsic.

This way I could remove special codegen for NI_ArmBase_LeadingZeroCount NI_ArmBase_Arm64_LeadingSignCount NI_ArmBase_Arm64_LeadingZeroCount.

… between table-driven and special intrinsics in jit/hwintrinsiccodegenarm64.cpp
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Dec 2, 2019
@echesakov
Copy link
Contributor Author

@dotnet/jit-contrib Can someone please review this?

This PR is a copy of #208. I had to re-open it since my fork was created before the runtime repo went public and I couldn't push anymore changes.

@echesakov echesakov merged commit d7970e7 into dotnet:master Dec 3, 2019
@echesakov echesakov deleted the HWIntrinsicClass branch December 3, 2019 00:16
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants