Skip to content

Commit e4b4f99

Browse files
committed
[OpenMP] Remove OMP spec versioning
Remove all older OMP spec versioning from the runtime and build system. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D64534 llvm-svn: 365963
1 parent 6035802 commit e4b4f99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+170
-7281
lines changed

openmp/README.rst

+2-6
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ Options for ``libomp``
141141
Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) to
142142
build for. This value is ignored if **LIBOMP_ARCH** does not equal ``mic``.
143143

144-
**LIBOMP_OMP_VERSION** = ``50|45|40|30``
145-
OpenMP version to build for. Older versions will disable certain
146-
functionality and entry points.
147-
148144
**LIBOMP_LIB_TYPE** = ``normal|profile|stubs``
149145
Library type can be ``normal``, ``profile``, or ``stubs``.
150146

@@ -192,8 +188,8 @@ Optional Features
192188
multi-node systems where a small ``CACHE_LINE`` setting leads to false sharing.
193189

194190
**LIBOMP_OMPT_SUPPORT** = ``ON|OFF``
195-
Include support for the OpenMP Tools Interface (OMPT).
196-
This option is supported and ``ON`` by default for x86, x86_64, AArch64, and
191+
Include support for the OpenMP Tools Interface (OMPT).
192+
This option is supported and ``ON`` by default for x86, x86_64, AArch64, and
197193
PPC64 on Linux* and macOS*.
198194
This option is ``OFF`` if this feature is not supported for the platform.
199195

openmp/runtime/CMakeLists.txt

+3-20
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,8 @@ libomp_check_variable(LIBOMP_ARCH 32e x86_64 32 i386 arm ppc64 ppc64le aarch64 m
6969
set(LIBOMP_LIB_TYPE normal CACHE STRING
7070
"Performance,Profiling,Stubs library (normal/profile/stubs)")
7171
libomp_check_variable(LIBOMP_LIB_TYPE normal profile stubs)
72-
set(LIBOMP_OMP_VERSION 50 CACHE STRING
73-
"The OpenMP version (50/45/40/30)")
74-
libomp_check_variable(LIBOMP_OMP_VERSION 50 45 40 30)
7572
# Set the OpenMP Year and Month assiociated with version
76-
if(${LIBOMP_OMP_VERSION} GREATER 50 OR ${LIBOMP_OMP_VERSION} EQUAL 50)
77-
set(LIBOMP_OMP_YEAR_MONTH 201611)
78-
elseif(${LIBOMP_OMP_VERSION} GREATER 45 OR ${LIBOMP_OMP_VERSION} EQUAL 45)
79-
set(LIBOMP_OMP_YEAR_MONTH 201511)
80-
elseif(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40)
81-
set(LIBOMP_OMP_YEAR_MONTH 201307)
82-
elseif(${LIBOMP_OMP_VERSION} GREATER 30 OR ${LIBOMP_OMP_VERSION} EQUAL 30)
83-
set(LIBOMP_OMP_YEAR_MONTH 201107)
84-
else()
85-
set(LIBOMP_OMP_YEAR_MONTH 200505)
86-
endif()
73+
set(LIBOMP_OMP_YEAR_MONTH 201611)
8774
set(LIBOMP_MIC_ARCH knc CACHE STRING
8875
"Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) (knf/knc). Ignored if not Intel(R) MIC Architecture build.")
8976
if("${LIBOMP_ARCH}" STREQUAL "mic")
@@ -213,7 +200,7 @@ endif()
213200
set(LIBOMP_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
214201
set(LIBOMP_SRC_DIR ${LIBOMP_BASE_DIR}/src)
215202
set(LIBOMP_TOOLS_DIR ${LIBOMP_BASE_DIR}/tools)
216-
set(LIBOMP_INC_DIR ${LIBOMP_SRC_DIR}/include/${LIBOMP_OMP_VERSION})
203+
set(LIBOMP_INC_DIR ${LIBOMP_SRC_DIR}/include)
217204
set(LIBOMP_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
218205

219206
# Enabling Fortran if it is needed
@@ -301,7 +288,7 @@ endif()
301288
# OMPT-support defaults to ON for OpenMP 5.0+ and if the requirements in
302289
# cmake/config-ix.cmake are fulfilled.
303290
set(OMPT_DEFAULT FALSE)
304-
if ((${LIBOMP_OMP_VERSION} GREATER 49) AND (LIBOMP_HAVE_OMPT_SUPPORT) AND (NOT WIN32))
291+
if ((LIBOMP_HAVE_OMPT_SUPPORT) AND (NOT WIN32))
305292
set(OMPT_DEFAULT TRUE)
306293
endif()
307294
set(LIBOMP_OMPT_SUPPORT ${OMPT_DEFAULT} CACHE BOOL
@@ -314,9 +301,6 @@ set(LIBOMP_OMPT_OPTIONAL TRUE CACHE BOOL
314301
if(LIBOMP_OMPT_SUPPORT AND (NOT LIBOMP_HAVE_OMPT_SUPPORT))
315302
libomp_error_say("OpenMP Tools Interface requested but not available in this implementation")
316303
endif()
317-
if(LIBOMP_OMPT_SUPPORT AND (${LIBOMP_OMP_VERSION} LESS 50))
318-
libomp_error_say("OpenMP Tools Interface only available with OpenMP 5.0, LIBOMP_OMP_VERSION is ${LIBOMP_OMP_VERSION}")
319-
endif()
320304

321305
# TSAN-support
322306
set(LIBOMP_TSAN_SUPPORT FALSE CACHE BOOL
@@ -368,7 +352,6 @@ if(${OPENMP_STANDALONE_BUILD})
368352
libomp_say("Intel(R) MIC Architecture -- ${LIBOMP_MIC_ARCH}")
369353
endif()
370354
libomp_say("Build Type -- ${CMAKE_BUILD_TYPE}")
371-
libomp_say("OpenMP Version -- ${LIBOMP_OMP_VERSION}")
372355
libomp_say("Library Kind -- ${LIBOMP_LIBRARY_KIND}")
373356
libomp_say("Library Type -- ${LIBOMP_LIB_TYPE}")
374357
libomp_say("Fortran Modules -- ${LIBOMP_FORTRAN_MODULES}")

openmp/runtime/cmake/LibompDefinitions.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ function(libomp_get_definitions_flags cppflags)
2828
# CMake doesn't include CPPFLAGS from environment, but we will.
2929
set(${cppflags} ${cppflags_local} ${LIBOMP_CPPFLAGS} $ENV{CPPFLAGS} PARENT_SCOPE)
3030
endfunction()
31-

openmp/runtime/cmake/LibompExports.cmake

+3-7
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@
1313

1414
# Create the suffix for the export directory
1515
# - Only add to suffix when not a default value
16-
# - Example suffix: .deb.30.s1
17-
# final export directory: exports/lin_32e.deb.30.s1/lib
18-
# - These suffixes imply the build is a Debug, OpenMP 3.0, Stats-Gathering version of the library
16+
# - Example suffix: .deb.s1
17+
# final export directory: exports/lin_32e.deb.s1/lib
18+
# - These suffixes imply the build is a Debug, Stats-Gathering version of the library
1919
set(libomp_suffix)
2020
libomp_append(libomp_suffix .deb DEBUG_BUILD)
2121
libomp_append(libomp_suffix .dia RELWITHDEBINFO_BUILD)
2222
libomp_append(libomp_suffix .min MINSIZEREL_BUILD)
23-
if(NOT "${LIBOMP_OMP_VERSION}" STREQUAL "45")
24-
libomp_append(libomp_suffix .${LIBOMP_OMP_VERSION})
25-
endif()
2623
libomp_append(libomp_suffix .s1 LIBOMP_STATS)
2724
libomp_append(libomp_suffix .ompt LIBOMP_OMPT_SUPPORT)
2825
if(${LIBOMP_OMPT_SUPPORT})
@@ -95,4 +92,3 @@ if(WIN32)
9592
COMMAND ${CMAKE_COMMAND} -E copy ${LIBOMPIMP_OUTPUT_DIRECTORY}/${LIBOMP_IMP_LIB_FILE} ${LIBOMP_EXPORTS_LIB_DIR}
9693
)
9794
endif()
98-

openmp/runtime/cmake/LibompHandleFlags.cmake

-12
Original file line numberDiff line numberDiff line change
@@ -198,18 +198,6 @@ function(libomp_get_gdflags gdflags)
198198
libomp_append(gdflags_local "-D stub" STUBS_LIBRARY)
199199
libomp_append(gdflags_local "-D HAVE_QUAD" LIBOMP_USE_QUAD_PRECISION)
200200
libomp_append(gdflags_local "-D USE_DEBUGGER" LIBOMP_USE_DEBUGGER)
201-
if(${LIBOMP_OMP_VERSION} GREATER 50 OR ${LIBOMP_OMP_VERSION} EQUAL 50)
202-
libomp_append(gdflags_local "-D OMP_50")
203-
endif()
204-
if(${LIBOMP_OMP_VERSION} GREATER 45 OR ${LIBOMP_OMP_VERSION} EQUAL 45)
205-
libomp_append(gdflags_local "-D OMP_45")
206-
endif()
207-
if(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40)
208-
libomp_append(gdflags_local "-D OMP_40")
209-
endif()
210-
if(${LIBOMP_OMP_VERSION} GREATER 30 OR ${LIBOMP_OMP_VERSION} EQUAL 30)
211-
libomp_append(gdflags_local "-D OMP_30")
212-
endif()
213201
if(${DEBUG_BUILD} OR ${RELWITHDEBINFO_BUILD})
214202
libomp_append(gdflags_local "-D KMP_DEBUG")
215203
endif()

openmp/runtime/src/CMakeLists.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,8 @@ else()
9797
libomp_append(LIBOMP_CXXFILES kmp_debugger.cpp LIBOMP_USE_DEBUGGER)
9898
libomp_append(LIBOMP_CXXFILES kmp_stats.cpp LIBOMP_STATS)
9999
libomp_append(LIBOMP_CXXFILES kmp_stats_timing.cpp LIBOMP_STATS)
100-
if(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40)
101-
libomp_append(LIBOMP_CXXFILES kmp_taskdeps.cpp)
102-
libomp_append(LIBOMP_CXXFILES kmp_cancel.cpp)
103-
endif()
100+
libomp_append(LIBOMP_CXXFILES kmp_taskdeps.cpp)
101+
libomp_append(LIBOMP_CXXFILES kmp_cancel.cpp)
104102
endif()
105103
# Files common to stubs and normal library
106104
libomp_append(LIBOMP_CXXFILES kmp_ftn_cdecl.cpp)

openmp/runtime/src/dllexports

+1-40
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,12 @@
279279
__kmpc_reduce 189
280280
__kmpc_end_reduce 190
281281

282-
# OpenMP 3.0
283-
284-
%ifdef OMP_30
285282
__kmpc_omp_task_alloc 191
286283
__kmpc_omp_task 192
287284
__kmpc_omp_taskwait 193
288285
__kmpc_omp_task_begin_if0 196
289286
__kmpc_omp_task_complete_if0 197
290287
__kmpc_omp_task_parts 198
291-
%endif # OMP_30
292288

293289
# __omp_collector_api 199
294290

@@ -320,9 +316,7 @@ kmpc_set_stacksize_s 222
320316
# kmpc_set_stats 217
321317
kmpc_set_defaults 224
322318

323-
# OMP 3.0 entry points for unsigned loop iteration variables
324319
%ifndef stub
325-
%ifdef OMP_30
326320
__kmpc_for_static_init_8u 225
327321
__kmpc_dispatch_init_8u 226
328322
__kmpc_dispatch_next_8u 227
@@ -331,25 +325,19 @@ kmpc_set_defaults 224
331325
__kmpc_dispatch_init_4u 230
332326
__kmpc_dispatch_next_4u 231
333327
__kmpc_dispatch_fini_4u 232
334-
%endif # OMP_30
335328
%endif
336329

337330
%ifndef stub
338331
__kmpc_get_taskid 233
339332
__kmpc_get_parent_taskid 234
340333
%endif
341334

342-
# OpenMP 3.1 entry points
343335
%ifndef stub
344-
%ifdef OMP_30
345336
__kmpc_omp_taskyield 235
346-
%endif # OMP_30
347337
# __kmpc_place_threads 236
348338
%endif
349339

350-
# OpenMP 4.0 entry points
351340
%ifndef stub
352-
%ifdef OMP_40
353341
__kmpc_push_proc_bind 237
354342
__kmpc_taskgroup 238
355343
__kmpc_end_taskgroup 239
@@ -372,12 +360,9 @@ kmpc_set_defaults 224
372360
__kmpc_team_static_init_4u 256
373361
__kmpc_team_static_init_8 257
374362
__kmpc_team_static_init_8u 258
375-
%endif # OMP_40
376363
%endif
377364

378-
# OpenMP 4.5 entry points
379365
%ifndef stub
380-
%ifdef OMP_45
381366
__kmpc_proxy_task_completed 259
382367
__kmpc_proxy_task_completed_ooo 260
383368
__kmpc_doacross_init 261
@@ -386,17 +371,14 @@ kmpc_set_defaults 224
386371
__kmpc_doacross_fini 264
387372
__kmpc_taskloop 266
388373
__kmpc_critical_with_hint 270
389-
%endif
390374
%endif
391375
kmpc_aligned_malloc 265
392376
kmpc_set_disp_num_buffers 267
393377

394-
# OpenMP 5.0 entry points
395378
%ifndef stub
396-
%ifdef OMP_50
397379
__kmpc_task_reduction_init 268
398380
__kmpc_task_reduction_get_th_data 269
399-
# USED FOR 4.5 __kmpc_critical_with_hint 270
381+
# USED ABOVE __kmpc_critical_with_hint 270
400382
__kmpc_get_target_offload 271
401383
__kmpc_omp_reg_task_with_affinity 272
402384
__kmpc_pause_resource 273
@@ -405,7 +387,6 @@ kmpc_set_disp_num_buffers 267
405387
__kmpc_task_allow_completion_event 276
406388
__kmpc_taskred_init 277
407389
__kmpc_taskred_modifier_init 278
408-
%endif
409390
%endif
410391

411392
# User API entry points that have both lower- and upper- case versions for Fortran.
@@ -463,7 +444,6 @@ kmp_aligned_malloc 747
463444
kmp_set_warnings_on 779
464445
kmp_set_warnings_off 780
465446

466-
%ifdef OMP_30
467447
omp_get_active_level 789
468448
omp_get_level 790
469449
omp_get_ancestor_thread_num 791
@@ -488,17 +468,9 @@ kmp_set_warnings_off 780
488468
kmpc_unset_affinity_mask_proc 858
489469
kmp_get_affinity_mask_proc 859
490470
kmpc_get_affinity_mask_proc 860
491-
%endif # OMP_30
492-
493-
# OpenMP 3.1
494471

495-
%ifdef OMP_30
496472
omp_in_final 861
497-
%endif # OMP_30
498473

499-
# OpenMP 40
500-
501-
%ifdef OMP_40
502474
omp_get_proc_bind 862
503475
#omp_set_proc_bind 863
504476
#omp_curr_proc_bind 864
@@ -510,11 +482,7 @@ kmp_set_warnings_off 780
510482
omp_set_default_device 879
511483
omp_get_default_device 880
512484
omp_get_num_devices 881
513-
%endif # OMP_40
514-
515-
# OpenMP 45
516485

517-
%ifdef OMP_45
518486
omp_init_lock_with_hint 870
519487
omp_init_nest_lock_with_hint 871
520488
omp_get_max_task_priority 872
@@ -534,11 +502,9 @@ kmp_set_warnings_off 780
534502
omp_target_associate_ptr 888
535503
omp_target_disassociate_ptr 889
536504
%endif
537-
%endif # OMP_45
538505

539506
kmp_set_disp_num_buffers 890
540507

541-
%ifdef OMP_50
542508
omp_control_tool 891
543509
omp_set_default_allocator 892
544510
omp_get_default_allocator 893
@@ -583,7 +549,6 @@ kmp_set_disp_num_buffers 890
583549
omp_const_mem_space DATA
584550
omp_high_bw_mem_space DATA
585551
omp_low_lat_mem_space DATA
586-
%endif # OMP_50
587552

588553
%ifndef stub
589554
# Ordinals between 900 and 999 are reserved
@@ -1033,8 +998,6 @@ kmp_set_disp_num_buffers 890
1033998
__kmpc_atomic_float10_div_cpt_fp
1034999
%endif
10351000

1036-
%ifdef OMP_40
1037-
10381001
# ATOMIC extensions for OpenMP 4.0 spec (x86 and x64 only)
10391002

10401003
__kmpc_atomic_fixed1_swp 2412
@@ -1209,8 +1172,6 @@ kmp_set_disp_num_buffers 890
12091172
__kmpc_atomic_float10_sub_cpt_rev_fp
12101173
__kmpc_atomic_float10_div_cpt_rev_fp
12111174
%endif
1212-
%endif # OMP_40
1213-
12141175

12151176
%endif # arch_64
12161177

0 commit comments

Comments
 (0)