[llvm] [SPIRV] Add support for non-interposable function aliases (PR #172730)
Manuel Carrasco via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 18 09:24:30 PST 2025
================
@@ -77,12 +80,51 @@ bool tryExtendDynamicLDSGlobal(GlobalVariable &GV) {
return true;
}
+// The backend does not support GlobalAlias. Replace aliases with their aliasees
+// when possible and remove them from the module.
+bool tryReplaceAliasWithAliasee(GlobalAlias &GA) {
+ // According to the lang ref, aliases cannot be replaced if either the alias
+ // or the aliasee are interposable. We only replace in the case that both
+ // are not interposable.
+ if (GA.isInterposable()) {
+ LLVM_DEBUG(dbgs() << "Skipping interposable alias: " << GA.getName()
+ << "\n");
+ return false;
+ }
+
+ GlobalObject *AO = GA.getAliaseeObject();
+ if (!AO) {
----------------
mgcarrasco wrote:
Done, thanks.
https://github.com/llvm/llvm-project/pull/172730
More information about the llvm-commits
mailing list