[PATCH] D118122: [WebAssembly] Refactor and fix emission of external IR global decls
Paulo Matos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 3 06:12:07 PST 2022
pmatos added a comment.
In D118122#3287371 <https://reviews.llvm.org/D118122#3287371>, @sbc100 wrote:
> I guess that re-enabling the emitExternalDecls in emitEndOfAsmFile would fix the emscripten issue (although that points to a missing test case). Not sure about the other failures reported here.
I have now added a missing test case and confirmed that the `emitExternalsDecls` is required in `emitEndOfAsmFile`.
The null Subtarget issue was supposed to be simple to fix. The Subtarget field is set on a per-function basis and we use that to obtain the TLI. The problem is, if you have no functions defined in the file Subtarget will always be null and never be set. We therefore need to obtain the TLI to pass to `computeLegalValuesVT` using some other way. I have however been looking at this for over an hour now and for some reason that escapes me the TLI seems to always be linked to a function and not obtainable otherwise. I will need to keep investigating this to be able to push a new patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118122/new/
https://reviews.llvm.org/D118122
More information about the llvm-commits
mailing list