[PATCH] [og10] openacc: Delete useless temp in gcn-tree.c

Julian Brown julian@codesourcery.com
Thu Jul 30 22:10:53 GMT 2020


This is an obvious cleanup to get rid of an unnecessary temporary
variable.

I will apply shortly to the og10 branch.

Thanks,

Julian

2020-07-30  Julian Brown  <julian@codesourcery.com>

gcc/
	* config/gcn/gcn-tree.c (gcn_goacc_reduction_teardown): Remove useless
	temporary variable "decl".
---
 gcc/ChangeLog.omp         | 5 +++++
 gcc/config/gcn/gcn-tree.c | 4 +---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index 9e6e95f667b7..12b8c044a1b1 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,8 @@
+2020-07-30  Julian Brown  <julian@codesourcery.com>
+
+	* config/gcn/gcn-tree.c (gcn_goacc_reduction_teardown): Remove useless
+	temporary variable "decl".
+
 2020-07-17  Andrew Stubbs  <ams@codesourcery.com>
 
 	Backport from mainline (42b47dae498):
diff --git a/gcc/config/gcn/gcn-tree.c b/gcc/config/gcn/gcn-tree.c
index 1dc9b21823b0..bfde71555d8a 100644
--- a/gcc/config/gcn/gcn-tree.c
+++ b/gcc/config/gcn/gcn-tree.c
@@ -603,9 +603,7 @@ gcn_goacc_reduction_teardown (gcall *call)
 
       /* Read the worker reduction buffer.  */
       tree offset = gimple_call_arg (call, 5);
-      tree decl
-	= gcn_goacc_get_worker_red_decl (var_type, TREE_INT_CST_LOW (offset));
-      var = decl;
+      var = gcn_goacc_get_worker_red_decl (var_type, TREE_INT_CST_LOW (offset));
     }
 
   if (level != GOMP_DIM_GANG)
-- 
2.23.0



More information about the Gcc-patches mailing list