summaryrefslogtreecommitdiffstats
path: root/openmp/runtime
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2018-07-26 18:15:02 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2018-07-26 18:15:02 +0000
commit3a0e9b37f3b592722b39d867404e62bf45bb786b (patch)
tree4b7adfe12b40142493db7ac863cb037402f5bab6 /openmp/runtime
parent6fbbf27d98e9e48415bb152b43746ddaab7514f8 (diff)
downloadbcm5719-llvm-3a0e9b37f3b592722b39d867404e62bf45bb786b.tar.gz
bcm5719-llvm-3a0e9b37f3b592722b39d867404e62bf45bb786b.zip
PR30734: Remove __kmp_ft_page_allocate()
This function was not enabled by default and not exported when manually tweaking the build flags. Additionally it was hard to use since there is no corresponding __kmp_ft_page_free(). The code itself is questionable because the returned memory address is padded by an extra pointer which stores the unpadded start of the allocated region (this would need to be freed). Differential Revision: https://reviews.llvm.org/D49802 llvm-svn: 338052
Diffstat (limited to 'openmp/runtime')
-rw-r--r--openmp/runtime/src/kmp.h9
-rw-r--r--openmp/runtime/src/kmp_alloc.cpp27
2 files changed, 0 insertions, 36 deletions
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h
index 497907b10f8..00166002e24 100644
--- a/openmp/runtime/src/kmp.h
+++ b/openmp/runtime/src/kmp.h
@@ -129,15 +129,6 @@ class kmp_stats_list;
#include "ompt-internal.h"
#endif
-/*Select data placement in NUMA memory */
-#define NO_FIRST_TOUCH 0
-#define FIRST_TOUCH 1 /* Exploit SGI's first touch page placement algo */
-
-/* If not specified on compile command line, assume no first touch */
-#ifndef BUILD_MEMORY
-#define BUILD_MEMORY NO_FIRST_TOUCH
-#endif
-
// 0 - no fast memory allocation, alignment: 8-byte on x86, 16-byte on x64.
// 3 - fast allocation using sync, non-sync free lists of any size, non-self
// free lists of limited size.
diff --git a/openmp/runtime/src/kmp_alloc.cpp b/openmp/runtime/src/kmp_alloc.cpp
index 8d584f78e4b..2299db9b3b4 100644
--- a/openmp/runtime/src/kmp_alloc.cpp
+++ b/openmp/runtime/src/kmp_alloc.cpp
@@ -1548,33 +1548,6 @@ void *___kmp_allocate(size_t size KMP_SRC_LOC_DECL) {
return ptr;
} // func ___kmp_allocate
-#if (BUILD_MEMORY == FIRST_TOUCH)
-void *__kmp_ft_page_allocate(size_t size) {
- void *adr, *aadr;
-
- const int page_size = KMP_GET_PAGE_SIZE();
-
- adr = (void *)__kmp_thread_malloc(__kmp_get_thread(),
- size + page_size + KMP_PTR_SKIP);
- if (adr == 0)
- KMP_FATAL(OutOfHeapMemory);
-
- /* check to see if adr is on a page boundary. */
- if (((kmp_uintptr_t)adr & (page_size - 1)) == 0)
- /* nothing to do if adr is already on a page boundary. */
- aadr = adr;
- else
- /* else set aadr to the first page boundary in the allocated memory. */
- aadr = (void *)(((kmp_uintptr_t)adr + page_size) & ~(page_size - 1));
-
- /* the first touch by the owner thread. */
- *((void **)aadr) = adr;
-
- /* skip the memory space used for storing adr above. */
- return (void *)((char *)aadr + KMP_PTR_SKIP);
-}
-#endif
-
/* Allocate memory on page boundary, fill allocated memory with 0x00.
Does not call this func directly! Use __kmp_page_allocate macro instead.
NULL is NEVER returned, __kmp_abort() is called in case of memory allocation
OpenPOWER on IntegriCloud