Skip to content

Commit 7233e42

Browse files
authored
[OpenMP][NFC] Move Environment.h and SourceInfo.h into "Shared" folder (#73703)
1 parent 1a041a3 commit 7233e42

File tree

16 files changed

+32
-26
lines changed

16 files changed

+32
-26
lines changed

openmp/libomptarget/DeviceRTL/include/Configuration.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
#ifndef OMPTARGET_CONFIGURATION_H
1414
#define OMPTARGET_CONFIGURATION_H
1515

16-
#include "Environment.h"
16+
#include "Shared/Environment.h"
17+
1718
#include "Types.h"
1819

1920
namespace ompx {

openmp/libomptarget/DeviceRTL/include/Interface.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
#ifndef OMPTARGET_DEVICERTL_INTERFACE_H
1313
#define OMPTARGET_DEVICERTL_INTERFACE_H
1414

15-
#include "Environment.h"
15+
#include "Shared/Environment.h"
16+
1617
#include "Types.h"
1718

1819
/// External API

openmp/libomptarget/DeviceRTL/include/State.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
#ifndef OMPTARGET_STATE_H
1313
#define OMPTARGET_STATE_H
1414

15+
#include "Shared/Environment.h"
16+
1517
#include "Debug.h"
16-
#include "Environment.h"
1718
#include "Mapping.h"
1819
#include "Types.h"
1920
#include "Utils.h"

openmp/libomptarget/DeviceRTL/src/Allocator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
//
99
//===----------------------------------------------------------------------===//
1010

11+
#include "Shared/Environment.h"
12+
1113
#include "Allocator.h"
1214
#include "Configuration.h"
13-
#include "Environment.h"
1415
#include "Mapping.h"
1516
#include "Synchronization.h"
1617
#include "Types.h"

openmp/libomptarget/DeviceRTL/src/Debug.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#include "Debug.h"
13+
#include "Shared/Environment.h"
14+
1415
#include "Configuration.h"
15-
#include "Environment.h"
16+
#include "Debug.h"
1617
#include "Interface.h"
1718
#include "Mapping.h"
1819
#include "State.h"

openmp/libomptarget/DeviceRTL/src/Kernel.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#include "Shared/Environment.h"
14+
1315
#include "Allocator.h"
1416
#include "Debug.h"
15-
#include "Environment.h"
1617
#include "Interface.h"
1718
#include "Mapping.h"
1819
#include "State.h"

openmp/libomptarget/DeviceRTL/src/State.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
//
99
//===----------------------------------------------------------------------===//
1010

11-
#include "State.h"
11+
#include "Shared/Environment.h"
12+
1213
#include "Allocator.h"
1314
#include "Configuration.h"
1415
#include "Debug.h"
15-
#include "Environment.h"
1616
#include "Interface.h"
1717
#include "LibC.h"
1818
#include "Mapping.h"
19+
#include "State.h"
1920
#include "Synchronization.h"
2021
#include "Types.h"
2122
#include "Utils.h"

openmp/libomptarget/include/Environment.h renamed to openmp/libomptarget/include/Shared/Environment.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===------------ Environment.h - OpenMP GPU environments --------- C++ -*-===//
1+
//===-- Shared/Environment.h - OpenMP GPU environments ------------ C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -10,8 +10,8 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#ifndef _OMPTARGET_ENVIRONMENT_H_
14-
#define _OMPTARGET_ENVIRONMENT_H_
13+
#ifndef OMPTARGET_SHARED_ENVIRONMENT_H
14+
#define OMPTARGET_SHARED_ENVIRONMENT_H
1515

1616
#ifdef OMPTARGET_DEVICE_RUNTIME
1717
#include "Types.h"
@@ -105,4 +105,4 @@ struct KernelLaunchEnvironmentTy {
105105
void *ReductionBuffer = nullptr;
106106
};
107107

108-
#endif // _OMPTARGET_ENVIRONMENT_H_
108+
#endif // OMPTARGET_SHARED_ENVIRONMENT_H

openmp/libomptarget/include/SourceInfo.h renamed to openmp/libomptarget/include/Shared/SourceInfo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===------- SourceInfo.h - Target independent OpenMP target RTL -- C++ -*-===//
1+
//===-- SharedSourceInfo.h - Target independent OpenMP target RTL - C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -10,8 +10,8 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#ifndef _SOURCE_INFO_H_
14-
#define _SOURCE_INFO_H_
13+
#ifndef OMPTARGET_SHARED_SOURCE_INFO_H
14+
#define OMPTARGET_SHARED_SOURCE_INFO_H
1515

1616
#include <string>
1717

@@ -110,4 +110,4 @@ static inline std::string getNameFromMapping(const map_var_info_t Name) {
110110
return NameStr.substr(Begin + 1, End - Begin - 1);
111111
}
112112

113-
#endif
113+
#endif // OMPTARGET_SHARED_SOURCE_INFO_H

openmp/libomptarget/include/omptarget.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
#ifndef _OMPTARGET_H_
1515
#define _OMPTARGET_H_
1616

17-
#include "Environment.h"
17+
#include "Shared/Environment.h"
18+
#include "Shared/SourceInfo.h"
1819

1920
#include <cstdint>
2021
#include <deque>
@@ -23,8 +24,6 @@
2324
#include <stdint.h>
2425
#include <type_traits>
2526

26-
#include <SourceInfo.h>
27-
2827
#include "llvm/ADT/SmallVector.h"
2928

3029
#define OFFLOAD_SUCCESS (0)

openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
#include <unordered_map>
2222

2323
#include "Shared/Debug.h"
24+
#include "Shared/Environment.h"
2425
#include "Shared/Utils.h"
2526

26-
#include "Environment.h"
2727
#include "GlobalHandler.h"
2828
#include "OmptCallback.h"
2929
#include "PluginInterface.h"

openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#include "PluginInterface.h"
1212

1313
#include "Shared/Debug.h"
14+
#include "Shared/Environment.h"
1415

15-
#include "Environment.h"
1616
#include "GlobalHandler.h"
1717
#include "JIT.h"
1818
#include "Utils/ELF.h"

openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
#include <vector>
2121

2222
#include "Shared/Debug.h"
23+
#include "Shared/Environment.h"
2324
#include "Shared/Utils.h"
2425

25-
#include "Environment.h"
2626
#include "GlobalHandler.h"
2727
#include "JIT.h"
2828
#include "MemoryManager.h"

openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include <unordered_map>
1818

1919
#include "Shared/Debug.h"
20+
#include "Shared/Environment.h"
2021

21-
#include "Environment.h"
2222
#include "GlobalHandler.h"
2323
#include "OmptCallback.h"
2424
#include "PluginInterface.h"

openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include <unordered_map>
1818

1919
#include "Shared/Debug.h"
20+
#include "Shared/Environment.h"
2021

21-
#include "Environment.h"
2222
#include "GlobalHandler.h"
2323
#include "OmptCallback.h"
2424
#include "PluginInterface.h"

openmp/libomptarget/src/private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#define _OMPTARGET_PRIVATE_H
1515

1616
#include "Shared/Debug.h"
17+
#include "Shared/SourceInfo.h"
1718

18-
#include "SourceInfo.h"
1919
#include "device.h"
2020
#include "omptarget.h"
2121

0 commit comments

Comments
 (0)