The data layout strings do not have any effect on llc tests and will become
misleadingly out of date as we continue to update the canonical data layout, so
remove them from the tests.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Good catch. I had to keep the data layout string in some opt tests for them to pass, so I'll go through and make sure to keep the data layout string in all the opt tests.
I'm ok with this change. I do hope we won't be continuing to update the canonical datalayout though.
Also I’m not sure if the data layout doesn’t really matter for llc tests, becuse llc also runs some IR passes. For example, WasmEHPrepare and LowerEmscriptenEHSjLj passes both run within llc and IIRC at least LowerEmscripten~ pass uses datalayout.
Surely we always want to let llvm set the data layout based on the triple though don't we? Does opt not do this too? What data layout other than default one for the given triple could it rationally select?
I think that makes sense. Currently it looks if the data layout string is missing we have the default here: https://github.com/llvm/llvm-project/blob/dfd9808b6cea59ff075498ee7e6e57f2b5b3a798/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp#L125-L131
But because this is from WebAssemblyTargetMachine, this only works for llc and not opt. I think we need to keep opt strings but maybe not llc then.