Skip to content

Commit

Permalink
Merge pull request #33 from RadeonOpenCompute/roc-1.7.1
Browse files Browse the repository at this point in the history
roc-1.7.1 updates
  • Loading branch information
kzhuravl authored Mar 23, 2018
2 parents fbbf9d4 + 6631f91 commit 6222243
Show file tree
Hide file tree
Showing 1,888 changed files with 81,179 additions and 21,480 deletions.
2 changes: 1 addition & 1 deletion .arcconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"project_id" : "clang",
"repository.callsign" : "C",
"conduit_uri" : "https://reviews.llvm.org/"
}
25 changes: 15 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,15 @@ set(CLANG_DEFAULT_OBJCOPY "objcopy" CACHE STRING
set(CLANG_DEFAULT_OPENMP_RUNTIME "libomp" CACHE STRING
"Default OpenMP runtime used by -fopenmp.")

# OpenMP offloading requires at least sm_30 because we use shuffle instructions
# to generate efficient code for reductions.
set(CLANG_OPENMP_NVPTX_DEFAULT_ARCH "sm_30" CACHE STRING
# OpenMP offloading requires at least sm_35 because we use shuffle instructions
# to generate efficient code for reductions and the atomicMax instruction on
# 64-bit integers in the implementation of conditional lastprivate.
set(CLANG_OPENMP_NVPTX_DEFAULT_ARCH "sm_35" CACHE STRING
"Default architecture for OpenMP offloading to Nvidia GPUs.")
string(REGEX MATCH "^sm_([0-9]+)$" MATCHED_ARCH "${CLANG_OPENMP_NVPTX_DEFAULT_ARCH}")
if (NOT DEFINED MATCHED_ARCH OR "${CMAKE_MATCH_1}" LESS 30)
message(WARNING "Resetting default architecture for OpenMP offloading to Nvidia GPUs to sm_30")
set(CLANG_OPENMP_NVPTX_DEFAULT_ARCH "sm_30" CACHE STRING
if (NOT DEFINED MATCHED_ARCH OR "${CMAKE_MATCH_1}" LESS 35)
message(WARNING "Resetting default architecture for OpenMP offloading to Nvidia GPUs to sm_35")
set(CLANG_OPENMP_NVPTX_DEFAULT_ARCH "sm_35" CACHE STRING
"Default architecture for OpenMP offloading to Nvidia GPUs." FORCE)
endif()

Expand Down Expand Up @@ -603,7 +604,9 @@ if (CLANG_ENABLE_BOOTSTRAP)
LLVM_BINUTILS_INCDIR
CLANG_REPOSITORY_STRING
CMAKE_MAKE_PROGRAM
CMAKE_OSX_ARCHITECTURES)
CMAKE_OSX_ARCHITECTURES
LLVM_ENABLE_PROJECTS
LLVM_ENABLE_RUNTIMES)

# We don't need to depend on compiler-rt if we're building instrumented
# because the next stage will use the same compiler used to build this stage.
Expand All @@ -621,7 +624,8 @@ if (CLANG_ENABLE_BOOTSTRAP)
set(COMPILER_OPTIONS
-DCMAKE_CXX_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${CXX_COMPILER}
-DCMAKE_C_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${C_COMPILER}
-DCMAKE_ASM_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${C_COMPILER})
-DCMAKE_ASM_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${C_COMPILER}
-DCMAKE_ASM_COMPILER_ID=Clang)

if(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED)
add_dependencies(clang-bootstrap-deps llvm-profdata)
Expand Down Expand Up @@ -653,7 +657,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
foreach(variableName ${variableNames})
if(variableName MATCHES "^BOOTSTRAP_")
string(SUBSTRING ${variableName} 10 -1 varName)
string(REPLACE ";" "\;" value "${${variableName}}")
string(REPLACE ";" "|" value "${${variableName}}")
list(APPEND PASSTHROUGH_VARIABLES
-D${varName}=${value})
endif()
Expand All @@ -669,7 +673,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
if("${${variableName}}" STREQUAL "")
set(value "")
else()
string(REPLACE ";" "\;" value ${${variableName}})
string(REPLACE ";" "|" value "${${variableName}}")
endif()
list(APPEND PASSTHROUGH_VARIABLES
-D${variableName}=${value})
Expand Down Expand Up @@ -697,6 +701,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1
LIST_SEPARATOR |
)

# exclude really-install from main target
Expand Down
10 changes: 10 additions & 0 deletions bindings/python/clang/cindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,12 @@ def is_virtual_method(self):
"""
return conf.lib.clang_CXXMethod_isVirtual(self)

def is_abstract_record(self):
"""Returns True if the cursor refers to a C++ record declaration
that has pure virtual member functions.
"""
return conf.lib.clang_CXXRecord_isAbstract(self)

def is_scoped_enum(self):
"""Returns True if the cursor refers to a scoped enum declaration.
"""
Expand Down Expand Up @@ -3401,6 +3407,10 @@ def cursor(self):
[Cursor],
bool),

("clang_CXXRecord_isAbstract",
[Cursor],
bool),

("clang_EnumDecl_isScoped",
[Cursor],
bool),
Expand Down
11 changes: 11 additions & 0 deletions bindings/python/tests/cindex/test_cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,17 @@ def test_is_virtual_method(self):
self.assertTrue(foo.is_virtual_method())
self.assertFalse(bar.is_virtual_method())

def test_is_abstract_record(self):
"""Ensure Cursor.is_abstract_record works."""
source = 'struct X { virtual void x() = 0; }; struct Y : X { void x(); };'
tu = get_tu(source, lang='cpp')

cls = get_cursor(tu, 'X')
self.assertTrue(cls.is_abstract_record())

cls = get_cursor(tu, 'Y')
self.assertFalse(cls.is_abstract_record())

def test_is_scoped_enum(self):
"""Ensure Cursor.is_scoped_enum works."""
source = 'class X {}; enum RegularEnum {}; enum class ScopedEnum {};'
Expand Down
2 changes: 1 addition & 1 deletion cmake/caches/Apple-stage2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS
LTO
clang-format
clang-headers
libcxx-headers
cxx-headers
${LLVM_TOOLCHAIN_TOOLS}
CACHE STRING "")

Expand Down
11 changes: 4 additions & 7 deletions cmake/caches/Fuchsia-stage2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@ set(PACKAGE_VENDOR Fuchsia CACHE STRING "")

set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "")
set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
set(LLVM_EXTERNALIZE_DEBUGINFO ON CACHE BOOL "")
set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")

set(LLVM_ENABLE_LTO ON CACHE BOOL "")
if(NOT APPLE)
set(LLVM_ENABLE_LLD ON CACHE BOOL "")
set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "")
endif()

if(APPLE)
set(LLDB_CODESIGN_IDENTITY "" CACHE STRING "")
endif()

set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "")
Expand Down Expand Up @@ -81,8 +80,6 @@ set(LLVM_TOOLCHAIN_TOOLS
set(LLVM_DISTRIBUTION_COMPONENTS
clang
lld
lldb
liblldb
LTO
clang-format
clang-headers
Expand Down
4 changes: 3 additions & 1 deletion cmake/caches/Fuchsia.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
set(CLANG_INCLUDE_TESTS OFF CACHE BOOL "")
set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "")
set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")

set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
set(CMAKE_BUILD_TYPE Release CACHE STRING "")

set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
Expand Down
16 changes: 6 additions & 10 deletions cmake/modules/AddClang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,9 @@ macro(add_clang_library name)
RUNTIME DESTINATION bin)

if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
add_custom_target(install-${name}
DEPENDS ${name}
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=${name}
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
add_llvm_install_targets(install-${name}
DEPENDS ${name}
COMPONENT ${name})
endif()
endif()
set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name})
Expand Down Expand Up @@ -147,11 +145,9 @@ macro(add_clang_tool name)
COMPONENT ${name})

if(NOT CMAKE_CONFIGURATION_TYPES)
add_custom_target(install-${name}
DEPENDS ${name}
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=${name}
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
add_llvm_install_targets(install-${name}
DEPENDS ${name}
COMPONENT ${name})
endif()
set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name})
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
# the usual CMake convention seems to be ${Project}Targets.cmake.
set(CLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/clang)
set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}")
set(clang_cmake_builddir "${CLANG_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}")

# Keep this in sync with llvm/cmake/CMakeLists.txt!
set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
Expand Down
50 changes: 49 additions & 1 deletion docs/ClangCommandLineReference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ Output path for the plist report

.. option:: -compatibility\_version<arg>

.. option:: --config <arg>

Specifies configuration file

.. option:: --constant-cfstrings

.. option:: -coverage, --coverage
Expand Down Expand Up @@ -1281,6 +1285,10 @@ Enable '\[\[\]\]' attributes in all C and C++ language modes

.. option:: -fdwarf-directory-asm, -fno-dwarf-directory-asm

.. option:: -fdwarf-exceptions

Use DWARF style exceptions

.. option:: -felide-constructors, -fno-elide-constructors

.. option:: -feliminate-unused-debug-symbols, -fno-eliminate-unused-debug-symbols
Expand Down Expand Up @@ -1357,6 +1365,10 @@ Implicitly search the file system for module map files.

.. option:: -finput-charset=<arg>

.. option:: -finstrument-function-entry-bare

Instrument function entry only, after inlining, without arguments to the instrumentation call

.. option:: -finstrument-functions

Generate calls to instrument function entry and exit
Expand Down Expand Up @@ -1537,6 +1549,10 @@ Enable ARC-style weak references in Objective-C

OpenMP target code is compiled as relocatable using the -c flag. For OpenMP targets the code is relocatable by default.

.. option:: -fopenmp-simd, -fno-openmp-simd

Emit OpenMP code only for SIMD-based constructs.

.. option:: -fopenmp-use-tls

.. option:: -fopenmp-version=<arg>
Expand Down Expand Up @@ -1678,6 +1694,10 @@ Turn on loop reroller

Generate a YAML optimization record file

.. option:: -fseh-exceptions

Use SEH style exceptions

.. option:: -fshort-enums, -fno-short-enums

Allocate to an enum type only as many bytes as it needs for the declared range of possible values
Expand Down Expand Up @@ -1862,6 +1882,10 @@ Treat signed integer overflow as two's complement

Store string literals as writable data

.. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents

Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented.

.. option:: -fxray-always-instrument=<arg>

Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.
Expand Down Expand Up @@ -1982,7 +2006,7 @@ Link stack frames through backchain on System Z

.. option:: -mconsole<arg>

.. option:: -mcpu=<arg>, -mv4 (equivalent to -mcpu=hexagonv4), -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62)
.. option:: -mcpu=<arg>, -mv4 (equivalent to -mcpu=hexagonv4), -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65)

.. option:: -mdefault-build-attributes<arg>, -mno-default-build-attributes<arg>

Expand Down Expand Up @@ -2104,6 +2128,10 @@ Omit frame pointer setup for leaf functions

Use copy relocations support for PIE builds

.. option:: -mprefer-vector-width=<arg>

Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.

.. option:: -mqdsp6-compat

Enable hexagon-qdsp6 backward compatibility
Expand Down Expand Up @@ -2290,6 +2318,10 @@ PowerPC

WebAssembly
-----------
.. option:: -mnontrapping-fptoint, -mno-nontrapping-fptoint

.. option:: -msign-ext, -mno-sign-ext

.. option:: -msimd128, -mno-simd128

X86
Expand All @@ -2306,6 +2338,8 @@ X86

.. option:: -mavx2, -mno-avx2

.. option:: -mavx512bitalg, -mno-avx512bitalg

.. option:: -mavx512bw, -mno-avx512bw

.. option:: -mavx512cd, -mno-avx512cd
Expand All @@ -2322,8 +2356,12 @@ X86

.. option:: -mavx512vbmi, -mno-avx512vbmi

.. option:: -mavx512vbmi2, -mno-avx512vbmi2

.. option:: -mavx512vl, -mno-avx512vl

.. option:: -mavx512vnni, -mno-avx512vnni

.. option:: -mavx512vpopcntdq, -mno-avx512vpopcntdq

.. option:: -mbmi, -mno-bmi
Expand All @@ -2348,6 +2386,10 @@ X86

.. option:: -mfxsr, -mno-fxsr

.. option:: -mgfni, -mno-gfni

.. option:: -mibt, -mno-ibt

.. option:: -mlwp, -mno-lwp

.. option:: -mlzcnt, -mno-lzcnt
Expand Down Expand Up @@ -2380,6 +2422,8 @@ X86

.. option:: -msha, -mno-sha

.. option:: -mshstk, -mno-shstk

.. option:: -msse, -mno-sse

.. option:: -msse2, -mno-sse2
Expand All @@ -2398,6 +2442,10 @@ X86

.. option:: -mtbm, -mno-tbm

.. option:: -mvaes, -mno-vaes

.. option:: -mvpclmulqdq, -mno-vpclmulqdq

.. option:: -mx87, -m80387, -mno-x87

.. option:: -mxop, -mno-xop
Expand Down
Loading

0 comments on commit 6222243

Please sign in to comment.