HomePhabricator

[OPENMP][NVPTX]Fix PR40893: Size doesn't match for…

Authored by ABataev on Mar 13 2019, 11:21 AM.

Description

[OPENMP][NVPTX]Fix PR40893: Size doesn't match for '_openmp_teams_reductions_buffer_$_.

nvlink does not handle weak linkage correctly, same symbols with the
different sizes are reported as erroneous though the largest size must
be chosen instead. Patch fixes this problem by using Internal linkage
instead of the Common.

llvm-svn: 356072

Details

Committed
ABataevMar 13 2019, 11:21 AM
Parents
rG510f26dca8a9: Regenerate test
Branches
Unknown
Tags
Unknown

Event Timeline

Is this bug only for common linkage, or does it also affect weakanylinkage? If so, we should update setPropertyExecutionMode to use internal as well

Is this bug only for common linkage, or does it also affect weakanylinkage? If so, we should update setPropertyExecutionMode to use internal as well

This is for weak linkage only.

Was that a typo? The patch changed common to internal. I'd quite like all the shared variables to have consistent linkage, with a mild preference for not-internal.

I don't remeber already. Probably, common linkage is emitted as weak in NVPTX codegen.

That's very plausible. Thanks, will experiment.