[llvm] [NVPTX] Add support for calling aliases (PR #81170)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 14:13:04 PST 2024
================
@@ -24,18 +50,12 @@ attributes #0 = { noreturn }
; CHECK: .visible .func noreturn()
; CHECK-NEXT: .noreturn
-; CHECK: .visible .func (.param .b32 func_retval0) b();
-; CHECK-NEXT: .alias b, a;
+; CHECK: .visible .func (.param .b32 func_retval0) z()
+; CHECK: call.uni (retval0),
+; CHECK-NEXT: b,
-; CHECK: .visible .func (.param .b32 func_retval0) c();
-; CHECK-NEXT: .alias c, a;
-; CHECK: .visible .func bar(
-; CHECK-NEXT: .param .b32 foo_param_0,
-; CHECK-NEXT: .param .b64 foo_param_1
-; CHECK-NEXT: );
-; CHECK-NEXT: .alias bar, foo;
-
-; CHECK: .visible .func noreturn_alias()
-; CHECK-NEXT: .noreturn;
-; CHECK-NEXT: .alias noreturn_alias, noreturn;
+; CHECK: .alias b, a;
+; CHECK: .alias c, a;
----------------
AlexMaclean wrote:
Aliases of aliases are not allowed in PTX but IR does.
> Identifier `fAlias` is a function declaration without body.
>
> Identifier `fAliasee` is a **function symbol which must be defined** in the same module as .alias declaration.
I've updated the code to use `getAliaseeObject` so that in PTX we emit the alias to the completely resolved target.
https://github.com/llvm/llvm-project/pull/81170
More information about the llvm-commits
mailing list