emscripten-core/emscripten

Add diagnose_if warnings for slow SIMD stuff?

Open

#12.871 aperta il 24 nov 2020

Vedi su GitHub
 (3 commenti) (1 reazione) (0 assegnatari)C++ (3519 fork)batch import
good first bughelp wanted

Metriche repository

Star
 (27.361 star)
Metriche merge PR
 (Merge medio 19g 10h) (147 PR mergiate in 30 g)

Descrizione

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

Guida contributor