This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Preserve original symbol during attribute propagation
ClosedPublic

Authored by rampitec on Mar 25 2020, 11:10 AM.

Details

Summary

AMDGPUPropagateAttributes can swap names while cloning a function.
Only do it if original symbol was not externally visible.

Diff Detail

Event Timeline

rampitec created this revision.Mar 25 2020, 11:10 AM
arsenm added inline comments.Mar 25 2020, 12:34 PM
llvm/lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp
282

The linkage wasn't set before for anonymous functions? That should get a test?

rampitec updated this revision to Diff 252654.Mar 25 2020, 1:17 PM
rampitec marked 2 inline comments as done.

Added test for anonymous function.
Fixed FileCheck prefixes.

llvm/lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp
282

It is universally set now on every clone as we do not mess with the original function name anymore.

arsenm accepted this revision.Mar 25 2020, 2:33 PM
This revision is now accepted and ready to land.Mar 25 2020, 2:33 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2020, 3:44 PM