How does JitIntrinsicAttribute affect code generation?

后端 未结 2 1048
南旧
南旧 2021-01-02 17:00

I was browsing .NET source code and saw this attribute. It says,

An attribute that can be attached to JIT Intrinsic methods/properties

2条回答
  •  盖世英雄少女心
    2021-01-02 17:48

    2018 update: apparently, [JitIntrinsic] was not used for its intended purpose and was replaced with System.Runtime.CompilerServices.IntrinsicAttribute.

    The attribute was mentioned in the discussion about moving Vector classes to the CoreLib:

    @jkotas: We should not need the JitIntrinsicAttribute. As far as I know, this attribute was future proofing, never used for anything real. We should delete it, and use the IntrinsicAttribute from CoreLib instead.

    And later replaced with Intrinsic: Replace JitIntrinsicAttribute with IntrinsicAttribute.

    See, What does the [Intrinsic] attribute in C# do? for the similar discussion about [Intrinsic] atrribute, which is actually used to implement low-level optimizations.

提交回复
热议问题