Closed windowsair closed 1 month ago
Note that this is due to a longstanding issue with the efficiency of the wasm backend: https://github.com/llvm/llvm-project/issues/47793
As mentioned there it's due to a loop getting inlined into the function several hundred times, which the relooper struggles with. Removing it dramatically reduces the compilation time and memory usage for that file:
diff --git a/clang/lib/AST/Interp/Disasm.cpp b/clang/lib/AST/Interp/Disasm.cpp
index 9fc22f2b6ea0..5ef71fb5c034 100644
--- a/clang/lib/AST/Interp/Disasm.cpp
+++ b/clang/lib/AST/Interp/Disasm.cpp
@@ -52,9 +52,6 @@ LLVM_DUMP_METHOD void Function::dump(llvm::raw_ostream &OS) const {
auto PrintName = [&OS](const char *Name) {
OS << Name;
- for (long I = 0, N = strlen(Name); I < 30 - N; ++I) {
- OS << ' ';
- }
};
for (CodePtr Start = getCodeBegin(), PC = Start; PC != getCodeEnd();) {
Github action seems out of memory, causing compilation to abort:
The patch adds swap space to CI and has been tested within my own repo. I'm not sure if we need to make any further changes to the build script or CI to make it abort when an error occurs, rather than silently continuing the build process?