Project

General

Profile

Cleanup #1416

Eliminate use of deprecated/removed keyword 'register'

Added by Phil Miller over 2 years ago. Updated over 2 years ago.

Status:
Merged
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
02/13/2017
Due date:
% Done:

0%


Description

C++17 eliminates the register keyword, and compilers have already been warning about it. We should clean it out of the source code

History

#1 Updated by Sam White over 2 years ago

I removed a bunch of these uses a while ago here: https://charm.cs.illinois.edu/gerrit/#/c/2005/
Here are the files with uses of it left:

src/arch/pami/default_ppcq.h
src/arch/pami/PPCAtomicQueue.h
src/arch/pamilrts/lrtsqueue.h
src/arch/util/compress-external.c
src/arch/util/compress.c
src/arch/util/lz4-compress.c
src/arch/util/lz4.c
src/arch/util/persist-comm.c
src/libs/ck-libs/datatransfer/volume_planes.C
src/libs/ck-libs/fem/fem_mesh.C
src/libs/ck-libs/ParFUM/mesh.C
src/util/cmimemcpy_qpx.c
src/util/dcopy.h
src/util/uJcontext.c
src/xlat-i/xi-scan.C
src/libs/conv-libs/openmp_llvm/runtime/src/*

#2 Updated by Sam White over 2 years ago

  • Assignee set to Sam White
  • Status changed from New to Implemented

Removed from all files above except for the generated file xi-scan.C and the upstream LLVM OpenMP runtime: https://charm.cs.illinois.edu/gerrit/#/c/2243/

#3 Updated by Phil Miller over 2 years ago

  • Status changed from Implemented to Merged
  • Target version set to 6.8.0
  • translation missing: en.field_closed_date set to 2017-02-15 10:39:18.058883

#4 Updated by Jim Phillips over 2 years ago

Breaks BG/Q:


jim@sunnyvale$git diff -r bde4765b956d0f11d27e3a1603dd6e0b19f63183 ./src/util/cmimemcpy_qpx.c
diff --git a/src/util/cmimemcpy_qpx.c b/src/util/cmimemcpy_qpx.c
index 9167106..3b75b2f 100644
--- a/src/util/cmimemcpy_qpx.c
+++ b/src/util/cmimemcpy_qpx.c
@@ -21,17 +21,17 @@

 //Copy 512 bytes from a 32b aligned pointers
 static inline size_t quad_copy_512( char* dest, char* src ) {
-    register double *fpp1_1, *fpp1_2;
-    register double *fpp2_1, *fpp2_2;
+    double *fpp1_1, *fpp1_2;
+    double *fpp2_1, *fpp2_2;

-    register double f0 FP_REG(0);
-    register double f1 FP_REG(1);
-    register double f2 FP_REG(2);
-    register double f3 FP_REG(3);
-    register double f4 FP_REG(4);
-    register double f5 FP_REG(5);
-    register double f6 FP_REG(6);
-    register double f7 FP_REG(7);
+    double f0 FP_REG(0);
+    double f1 FP_REG(1);
+    double f2 FP_REG(2);
+    double f3 FP_REG(3);
+    double f4 FP_REG(4);
+    double f5 FP_REG(5);
+    double f6 FP_REG(6);
+    double f7 FP_REG(7);

     int r0;
     int r1;

../bin/charmc  -optimize -production   -I. -O3   -c -o cmimemcpy_qpx.o cmimemcpy_qpx.c
"cmimemcpy_qpx.c", line 27.15: 1506-1335 (S) Specified register name 'f0' can only be used to declare a variable with register storage class.
"cmimemcpy_qpx.c", line 28.15: 1506-1335 (S) Specified register name 'f1' can only be used to declare a variable with register storage class.
"cmimemcpy_qpx.c", line 29.15: 1506-1335 (S) Specified register name 'f2' can only be used to declare a variable with register storage class.
"cmimemcpy_qpx.c", line 30.15: 1506-1335 (S) Specified register name 'f3' can only be used to declare a variable with register storage class.
"cmimemcpy_qpx.c", line 31.15: 1506-1335 (S) Specified register name 'f4' can only be used to declare a variable with register storage class.
"cmimemcpy_qpx.c", line 32.15: 1506-1335 (S) Specified register name 'f5' can only be used to declare a variable with register storage class.
"cmimemcpy_qpx.c", line 33.15: 1506-1335 (S) Specified register name 'f6' can only be used to declare a variable with register storage class.
"cmimemcpy_qpx.c", line 34.15: 1506-1335 (S) Specified register name 'f7' can only be used to declare a variable with register storage class.
"cmimemcpy_qpx.c", line 104.22: 1506-280 (W) Function argument assignment between types "char*" and "const char*" is not allowed.
Fatal Error by charmc in directory /usr/tmp/charm-6.8.0-build-2017-Feb-15-12714-pami-bluegeneq-async-smp-xlc/charm-6.8.0-pre/pami-bluegeneq-async-smp-xlc/tmp
   Command bgxlc_r -qcpluscmt -qhalt=e -qnokeyword=__int128 -qtls=local-exec -I../bin/../include -I/bgsys/drivers/ppcfloor/comm/include -I/bgsys/drivers/ppcfloor/spi/include -I/bgsys/drivers/ppcfloor -I/bgsys/drivers/ppcfloor/spi/include/kernel/cnk -I/soft/libraries/alcf/current/xl/ZLIB//include -D__CHARMC__=1 -I. -O3 -O3 -U_FORTIFY_SOURCE -c cmimemcpy_qpx.c -o cmimemcpy_qpx.o returned error code 1

#5 Updated by Sam White over 2 years ago

Thanks for pointing that out, fix is here: https://charm.cs.illinois.edu/gerrit/#/c/2256/

Also available in: Atom PDF