Proper way to enable SSE4 on a per-function / per-block of code basis?

后端 未结 3 854
鱼传尺愫
鱼传尺愫 2021-02-06 04:20

For one of my OS X programs, I have a few optimized cases which use SSE4.1 instructions. On SSE3-only machines, the non-optimized branch is ran:

// SupportsSSE4         


        
3条回答
  •  你的背包
    2021-02-06 05:00

    Depending on the OS you might be able to use something like Function Multiversioning in the future. I'm working on the feature right now, but it'll be a while before it's ready for use in a production compiler.

    See http://gcc.gnu.org/wiki/FunctionMultiVersioning for more details.

提交回复
热议问题