JuliaLang/julia

Choose target ISA in `@code_llvm` and `@code_native`

开放

#52,949 创建于 2024年1月17日

 (12 条评论) (1 个反应) (0 位负责人)Julia (5,773 个派生)batch import
featuregood first issue

仓库指标

星标
 (48,709 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

@vchuravy mentioned on slack that it should be possible to teach @code_llvm and @code_native to generate code for a different ISA (but within same architecture) than the target chosen at startup with -C (native by default), with the only caveat that it'd work only for ISAs that are equal to or smaller than the current one.

A nice use case for this would be to able to choose the target in Compiler Explorer, whose julia backend at the moment only generates code for whatever is the native CPU currently being used.

It'd be nice to have pointers of where one would need to look at, in case they were interested in tackling the issue :slightly_smiling_face:

贡献者指南