This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Request module used variables from LDS lowering as internal
ClosedPublic

Authored by rampitec on May 20 2021, 4:10 PM.

Details

Summary

I do not see any practical difference but technically
used.* variables are internal and a call to getGlobalVariable
misses true as a second argument. NFC as far as I can tell.

Diff Detail

Event Timeline

rampitec created this revision.May 20 2021, 4:10 PM
rampitec requested review of this revision.May 20 2021, 4:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2021, 4:10 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm accepted this revision.May 20 2021, 6:01 PM
This revision is now accepted and ready to land.May 20 2021, 6:01 PM

Ah, apologies. I misread/misremembered this. The global variable looked up here is llvm.used / llvm.compiler.used, and not the LDS variable that is going to be removed.

I can't tell if AppendingLinkage qualifies as internal or not from the documentation. From going code reading, it isn't. Control flow hits AllowLocal || !Result->hasLocalLinkage(), and appending linkage will return false for hasLocalLinkage.

I don't know if we're better off with getGlobalVariable or getNamedGlobal here. Functionally, no difference.