[Openmp-commits] [openmp] 09834f9 - [libomptarget][nfc] Move non-freestanding headers out of common
via Openmp-commits
openmp-commits at lists.llvm.org
Tue Mar 31 15:43:34 PDT 2020
Author: JonChesterfield
Date: 2020-03-31T23:43:18+01:00
New Revision: 09834f976125545c74b8c1161be5204352165368
URL: https://github.com/llvm/llvm-project/commit/09834f976125545c74b8c1161be5204352165368
DIFF: https://github.com/llvm/llvm-project/commit/09834f976125545c74b8c1161be5204352165368.diff
LOG: [libomptarget][nfc] Move non-freestanding headers out of common
Summary:
[libomptarget][nfc] Move non-freestanding headers out of common
Lowers the bar for building deviceRTL.
Drops math.h entirely as it wasn't used and libm is a big dependency.
Reviewers: jdoerfert, ABataev, grokos
Reviewed By: jdoerfert
Subscribers: jvesely, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D77071
Added:
Modified:
openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
openmp/libomptarget/deviceRTLs/common/debug.h
openmp/libomptarget/deviceRTLs/common/omptarget.h
openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
Removed:
################################################################################
diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h b/openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
index c2d5e329f0a5..04755a6a3e73 100644
--- a/openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
+++ b/openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
@@ -18,6 +18,8 @@
#include "amdgcn_interface.h"
+#include <assert.h>
+#include <inttypes.h>
#include <stddef.h>
#include <stdint.h>
diff --git a/openmp/libomptarget/deviceRTLs/common/debug.h b/openmp/libomptarget/deviceRTLs/common/debug.h
index b232490c43c2..d39ef9d05244 100644
--- a/openmp/libomptarget/deviceRTLs/common/debug.h
+++ b/openmp/libomptarget/deviceRTLs/common/debug.h
@@ -127,7 +127,6 @@
////////////////////////////////////////////////////////////////////////////////
#if OMPTARGET_NVPTX_DEBUG || OMPTARGET_NVPTX_TEST || OMPTARGET_NVPTX_WARNING
-#include <stdio.h>
#include "common/support.h"
template <typename... Arguments>
@@ -138,7 +137,6 @@ NOINLINE static void log(const char *fmt, Arguments... parameters) {
#endif
#if OMPTARGET_NVPTX_TEST
-#include <assert.h>
template <typename... Arguments>
NOINLINE static void check(bool cond, const char *fmt,
diff --git a/openmp/libomptarget/deviceRTLs/common/omptarget.h b/openmp/libomptarget/deviceRTLs/common/omptarget.h
index d17edb05e6aa..7985691bb8ef 100644
--- a/openmp/libomptarget/deviceRTLs/common/omptarget.h
+++ b/openmp/libomptarget/deviceRTLs/common/omptarget.h
@@ -14,11 +14,6 @@
#ifndef OMPTARGET_H
#define OMPTARGET_H
-// std includes
-#include <inttypes.h>
-#include <math.h>
-
-// local includes
#include "target_impl.h"
#include "common/debug.h" // debug
#include "interface.h" // interfaces with omp, compiler, and user
diff --git a/openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu b/openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
index c259c7707895..f6523c8ce8aa 100644
--- a/openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
+++ b/openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
@@ -11,7 +11,6 @@
//===----------------------------------------------------------------------===//
#include "common/omptarget.h"
#include "target_impl.h"
-#include <stdio.h>
// Return true if this is the master thread.
INLINE static bool IsMasterThread(bool isSPMDExecutionMode) {
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h b/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
index 04d510b11591..1b966510ec7e 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
@@ -12,7 +12,10 @@
#ifndef _TARGET_IMPL_H_
#define _TARGET_IMPL_H_
+#include <assert.h>
#include <cuda.h>
+#include <inttypes.h>
+#include <stdio.h>
#include <stdlib.h>
#include "nvptx_interface.h"
More information about the Openmp-commits
mailing list