Branch: refs/heads/master
Revision: 31d5a48
Author: mppf
Log Message:
Merge pull request #17789 from mppf/arm-llvm-abi
Fix problems with ARM ABI support in multilocale compilation
We were seeing internal errors for compilation on multilocale ARM
configurations. Debugging the issue, I found that the code generator was
generating a call to chpl_executeOnFast
but doing so without the
benefit of ABI information. The ABI support added in PRs starting with
#15903 was applying to the export proc
declaration and the generated
function body but when generating the call, the compiler was not figuring
out that it should generate an ABI-compatible version. That is because
the code generator calls a lot of functions with a particular C string as
the function to call. The problem was that, when that happened, the
compiler didn't have anywhere to check that it's an extern
/export
function.
This PR addresses the problem by arranging for almost all calls with such
a C string for function name to go through a process of finding the Clang
FunctionDecl or Chapel FnSymbol if they exist. To that end, added a
functionCNameAstrToSymbol map to GenInfo. While there, it annoyed me to
debug the many overloads of codegenCall
and codegenCallExpr
and so I
renamed the ones accepting a vector of arguments to codegenCallWithArgs
etc which make sure to look up the Clang FunctionDecl or Chapel FnSymbol
by name. These in turn call codegenCallExprInner
which contains most of
the ABI logic.
While working on an ARM system, I noticed that the make
process failed
initially due to missing override
keywords in LLVM header files. So,
this PR adjusts our Makefile configuring GCC to ask for override
warnings but not errors.
Reviewed by @e-kayrakli - thanks!
-
[x] hellos pass on multilocale arm
-
[x] test/runtime/configMatters pass on multilocale arm
-
[x] full local testing
Modified Files:
M compiler/codegen/codegen.cpp
M compiler/codegen/expr.cpp
M compiler/include/codegen.h
M make/compiler/Makefile.gnuCompare: Comparing 14d28909e9b2...31d5a48254b9 · chapel-lang/chapel · GitHub