[amdgcn] Reinitialize registers for every function
authorKwok Cheung Yeung <kcy@codesourcery.com>
Fri, 15 Nov 2019 14:56:41 +0000 (14:56 +0000)
committerKwok Cheung Yeung <kcy@gcc.gnu.org>
Fri, 15 Nov 2019 14:56:41 +0000 (14:56 +0000)
gcn_conditional_register_usage needs to be called for every function
to set the fixed registers depending on the kernel args currently
requested.

2019-11-15  Kwok Cheung Yeung  <kcy@codesourcery.com>

gcc/
* config/gcn/gcn.c (gcn_init_cumulative_args): Call reinit_regs.

From-SVN: r278299

gcc/ChangeLog
gcc/config/gcn/gcn.c

index 1e32d49e9eb161fb4352df6a920076f02d804aff..7c963cde7bac5658824ff55363d5d8be6e9484a2 100644 (file)
@@ -1,6 +1,9 @@
 2019-11-15  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
-       gcc/
+       * config/gcn/gcn.c (gcn_init_cumulative_args): Call reinit_regs.
+
+2019-11-15  Kwok Cheung Yeung  <kcy@codesourcery.com>
+
        * config/gcn/gcn.c (gcn_expand_prologue): Remove initialization and
        prologue use of v0.
        (print_operand_address): Use v1 for zero vector offset.
index 4f72758e28544e65afa0fc4b0d951e55f0430322..d2ec6e11430c19466063718442429cf19cb17798 100644 (file)
@@ -2438,6 +2438,8 @@ gcn_init_cumulative_args (CUMULATIVE_ARGS *cum /* Argument info to init */ ,
   cfun->machine->args = cum->args;
   if (!caller && cfun->machine->normal_function)
     gcn_detect_incoming_pointer_arg (fndecl);
+
+  reinit_regs ();
 }
 
 static bool