-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[NFC] Add comment to describe the intention use of newly added avail-extern-gv-in-addrspace-to-local
#144911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFC] Add comment to describe the intention use of newly added avail-extern-gv-in-addrspace-to-local
#144911
Conversation
…-extern-gv-in-addrspace-to-local`
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@llvm/pr-subscribers-llvm-transforms Author: Shilei Tian (shiltian) ChangesFull diff: https://github.com/llvm/llvm-project/pull/144911.diff 1 Files Affected:
diff --git a/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp b/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp
index bc98f994f490c..538755e66f9cf 100644
--- a/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp
+++ b/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp
@@ -35,6 +35,10 @@ static cl::opt<bool> ConvertToLocal(
cl::desc("Convert available_externally into locals, renaming them "
"to avoid link-time clashes."));
+// This option was originally introduced to correctly support the lowering of
+// LDS variables for AMDGPU when ThinLTO is enabled. It can be utilized for
+// other purposes, but make sure it is safe to do so, as privatizing global
+// variables is generally not safe.
static cl::opt<unsigned> ConvertGlobalVariableInAddrSpace(
"avail-extern-gv-in-addrspace-to-local", cl::Hidden,
cl::desc(
|
I didn't add the assertion part suggested by @teresajohnson because that would need the test case to be amdgcn specific as well. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/17770 Here is the relevant piece of the build log for the reference
|
…-extern-gv-in-addrspace-to-local` (llvm#144911)
No description provided.