[Openmp-commits] [PATCH] D51653: [libomptarget] Remove `Devices` from `RTLInfoTy`

Sergey Dmitriev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Sep 4 13:25:43 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL341399: [libomptarget] Remove `Devices` from `RTLInfoTy` (authored by sdmitriev, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D51653?vs=163891&id=163896#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D51653

Files:
  openmp/trunk/libomptarget/src/rtl.cpp
  openmp/trunk/libomptarget/src/rtl.h


Index: openmp/trunk/libomptarget/src/rtl.h
===================================================================
--- openmp/trunk/libomptarget/src/rtl.h
+++ openmp/trunk/libomptarget/src/rtl.h
@@ -43,7 +43,6 @@
                                    // i.e. the OpenMP index of the first device
                                    // to be registered with this RTL.
   int32_t NumberOfDevices;         // Number of devices this RTL deals with.
-  std::vector<DeviceTy *> Devices; // one per device (NumberOfDevices in total).
 
   void *LibraryHandler;
 
@@ -74,7 +73,7 @@
   // The existence of the mutex above makes RTLInfoTy non-copyable.
   // We need to provide a copy constructor explicitly.
   RTLInfoTy()
-      : Idx(-1), NumberOfDevices(-1), Devices(), LibraryHandler(0),
+      : Idx(-1), NumberOfDevices(-1), LibraryHandler(0),
 #ifdef OMPTARGET_DEBUG
         RTLName(),
 #endif
@@ -86,7 +85,6 @@
   RTLInfoTy(const RTLInfoTy &r) : Mtx() {
     Idx = r.Idx;
     NumberOfDevices = r.NumberOfDevices;
-    Devices = r.Devices;
     LibraryHandler = r.LibraryHandler;
 #ifdef OMPTARGET_DEBUG
     RTLName = r.RTLName;
Index: openmp/trunk/libomptarget/src/rtl.cpp
===================================================================
--- openmp/trunk/libomptarget/src/rtl.cpp
+++ openmp/trunk/libomptarget/src/rtl.cpp
@@ -223,9 +223,6 @@
           Devices[start + device_id].DeviceID = start + device_id;
           // RTL local device ID
           Devices[start + device_id].RTLDeviceID = device_id;
-
-          // Save pointer to device in RTL in case we want to unregister the RTL
-          R.Devices.push_back(&Devices[start + device_id]);
         }
 
         // Initialize the index of this RTL and save it in the used RTLs.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51653.163896.patch
Type: text/x-patch
Size: 1739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180904/9f3e7861/attachment.bin>


More information about the Openmp-commits mailing list