emscripten-core/emscripten

Add diagnose_if warnings for slow SIMD stuff?

Open

#12.871 geöffnet am 24. Nov. 2020

Auf GitHub ansehen
 (3 Kommentare) (1 Reaktion) (0 zugewiesene Personen)C++ (3.519 Forks)batch import
good first bughelp wanted

Repository-Metriken

Stars
 (27.361 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19T 10h) (147 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide