Controlling SIMD codegen on a module by module basis?

Johan j at j.nl
Sun Jan 7 12:08:17 UTC 2024


On Sunday, 7 January 2024 at 10:48:47 UTC, claptrap wrote:
> Say you support no-SSE, SSE or AVX and you want to pick which 
> to use at runtime. Is there a way to tell the optimizer not to 
> use AVX, or SEE on a given module? Like set "-mattr" on a 
> module by module basis?

You can use @ldc.attributes.target for this.
https://wiki.dlang.org/LDC-specific_language_changes#.40.28ldc.attributes.target.28.22feature.22.29.29

cheers,
   Johan



More information about the digitalmars-d-ldc mailing list