Depends on D56501. Also adds a macro define
__wasm_unimplemented_simd128__ for feature detection of unimplemented
SIMD builtins.
Details
Diff Detail
- Repository
- rC Clang
- Build Status
Buildable 26613 Build 26612: arc lint + arc unit
Event Timeline
| include/clang/Basic/BuiltinsWebAssembly.def | ||
|---|---|---|
| 53–60 | clang-format this file | |
| lib/Basic/Targets/WebAssembly.cpp | ||
| 125 | Minor thing, but should we extract this as a function? It is gonna be a couple line anyway, like if (CPU == "bleeding-edge") {
...
Features["unimplemented-simd128"] = Features["simd128"] = true;
}
if (SIMDLevel >= SIMD128)
Features["simd128"] = true;
if (SIMDLevel >= UnimplementedSIMD128)
Features["unimplemented-simd128"] = true;
...
And to me it is more readable to see all `Features` setting in one place. But I'm not too opinionated either. | |
| 134 | The indentation of these functions looks weird and there are lines that exceeds 80 cols. clang-format? | |
| test/CodeGen/builtins-wasm.c | ||
| 2 | Maybe we can add a line that disables one of the target features and make sure it fails? You can do something like RUN: not %clang_cc1 ... to see if it fails. | |
| lib/Basic/Targets/WebAssembly.cpp | ||
|---|---|---|
| 125 | The structure of basically all this code is pulled from X86.cpp, which is obviously has a lot more features to wrangle. This particular function is similar to setSSELevel in X86.cpp. I agree that it probably doesn't need to be separate now, but as we explore possible extensions to the SIMD proposal in the future I think it will be useful to have this function. | |
| 134 | Done, and copied my pre-commit git hooks from the main LLVM repo so it won't be an issue again. | |
| include/clang/Basic/BuiltinsWebAssembly.def | ||
|---|---|---|
| 53–60 | This file still does not look like clang-formatted; I guess your script misses this file because its extension is def. | |
| include/clang/Basic/BuiltinsWebAssembly.def | ||
|---|---|---|
| 53–60 | As discussed, clang-format might be bad for readability in this file. | |
clang-format this file