Link: Use Clang ABI Info to pass extern records by pointer on M1s by benharsh · Pull Request #20270 · chapel-lang/chapel · GitHub
Merge pull request #20270 from benharsh/clang-abi-m1
Use Clang ABI Info to pass extern records by pointer on M1s
Issue #19218 describes a problem where the fileIO primer fails to successfully run on M1 machines under LLVM. The problem appears to be that LLVM is generating incorrect assembly when passing sufficiently large structs by value (and when optimizations are turned off).
This PR works around the underlying issue by querying ABI information from Clang, and providing that information to the existing codegen logic that determines whether such actuals/formals should use a pointer.
This PR also restores
CHPL_LLVM=system as a compatible option for M1 systems, and removes the suppressif on the fileIO primer.
Modified Files: R test/release/examples/primers/fileIO.suppressif