emscripten-core/emscripten

Add diagnose_if warnings for slow SIMD stuff?

開放

#12,871 建立於 2020年11月24日

 (3 則留言) (1 個反應) (0 位負責人)C++ (3,519 個分叉)batch import
good first bughelp wanted

倉庫指標

星標
 (27,361 顆星)
PR 合併指標
 (平均合併 19天 10小時) (30 天內合併 147 個 PR)

描述

The SIMD emulation occasionally drops to scalarized code. In addition to putting a bomb emoji in the doc, we can use something like __attribute__((diagnose_if(__EMSCRIPTEN_SIMD_🐌__ < 4, "💣", "warning")))__ to mark them in the header too. Clang would then emit warnings when a tagged function are called. Doing so might help developers with hunting down slow emulations.

Doc: https://clang.llvm.org/docs/AttributeReference.html#diagnose-if

貢獻者指南