JuliaLang/julia

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

Open

#52,949 建立於 2024年1月17日

在 GitHub 查看
 (12 留言) (1 反應) (0 負責人)Julia (5,773 fork)batch import
featuregood first issue

倉庫指標

Star
 (48,709 star)
PR 合併指標
 (平均合併 20天 6小時) (30 天內合併 157 個 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:

貢獻者指南