Skip to content

Commit

Permalink
Overwritten with: a62196f Manual merge master:b0c1900820c into amd-gf…
Browse files Browse the repository at this point in the history
…x:aa6473684ac

Based on upstream llvm : b0c1900 [ARM,MVE] Add reversed isel patterns for MVE `vcmp qN,rN`

Local changes since b3cb789:
a62196f Manual merge master:b0c1900820c into amd-gfx:aa6473684ac
aa64736 Merged master:1587c7e86f1 into amd-gfx:c4fabe0ca62
c4fabe0 Manually merged master:32dfbd131da into amd-gfx:668f0b909c2
668f0b9 Merged master:1583158042a into amd-gfx:742c4b581f8
742c4b5 Merged master:e9bf7a60a03 into amd-gfx:06bb84fb51f
06bb84f Merged master:3d6b53980ce into amd-gfx:cf4b9356a59
cf4b935 Merged master:86f07e826f4 into amd-gfx:1b898c6c158
1b898c6 Merged master:f7499011ca2 into amd-gfx:5980e79c13d
5980e79 Merged master:a12f588ebb1 into amd-gfx:d3cebd9c93a
d3cebd9 Merged master:fd9fa9995cd into amd-gfx:35089c4c3b6
35089c4 Merged master:fed17867cd4 into amd-gfx:065f7d6ebe6
065f7d6 Merged master:9a1c243aa5d into amd-gfx:3cc5daff06c
3cc5daf Merged master:d384ad6b636 into amd-gfx:b1a4e621b5a
b1a4e62 Merged master:ef150e2ea51 into amd-gfx:dbed94f8efc
dbed94f Merged master:592dd459242 into amd-gfx:cbf5809133d
cbf5809 Merged master:7d0b1d77b3d into amd-gfx:a850655dec9
a850655 Merged master:eb8710cb93a into amd-gfx:c8e1ec406d7
c8e1ec4 Merged master:49fb4a96e0b into amd-gfx:1613c2ba305
1613c2b Merged master:fdf3d1766bb into amd-gfx:82c58d0dd35
82c58d0 Merged master:59d3fbc227c into amd-gfx:b1e28d1cf0a
b1e28d1 Merged master:51adeae1c90 into amd-gfx:f5179b4e8c1
f5179b4 Merged master:15bc4dc9a89 into amd-gfx:d401164f02a

Added AMD modification notices and removed non-LLVM directories and some GPL files.

Change-Id: I2488ebcc3395e6214a722845c8d2c575170cf80c
  • Loading branch information
trenouf committed Nov 19, 2019
2 parents b3cb789 + a62196f commit 9894965
Show file tree
Hide file tree
Showing 1,070 changed files with 25,362 additions and 7,331 deletions.
33 changes: 22 additions & 11 deletions llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if(NOT DEFINED LLVM_VERSION_PATCH)
set(LLVM_VERSION_PATCH 0)
endif()
if(NOT DEFINED LLVM_VERSION_SUFFIX)
set(LLVM_VERSION_SUFFIX svn)
set(LLVM_VERSION_SUFFIX git)
endif()

if (NOT PACKAGE_VERSION)
Expand Down Expand Up @@ -530,6 +530,10 @@ option(LLVM_BUILD_EXAMPLES
"Build the LLVM example programs. If OFF, just generate build targets." OFF)
option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON)

if(LLVM_BUILD_EXAMPLES)
add_definitions(-DBUILD_EXAMPLES)
endif(LLVM_BUILD_EXAMPLES)

option(LLVM_BUILD_TESTS
"Build LLVM unit tests. If OFF, just generate build targets." OFF)
option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON)
Expand Down Expand Up @@ -564,17 +568,28 @@ if(NOT DEFINED LLVM_DYLIB_COMPONENTS)
set(LLVM_DYLIB_COMPONENTS "all" CACHE STRING
"Semicolon-separated list of components to include in libLLVM, or \"all\".")
endif()
option(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" OFF)

if(MSVC)
option(LLVM_BUILD_LLVM_C_DYLIB "Build LLVM-C.dll (Windows only)" ON)
# Set this variable to OFF here so it can't be set with a command-line
# argument.
set (LLVM_LINK_LLVM_DYLIB OFF)
if (BUILD_SHARED_LIBS)
message(FATAL_ERROR "BUILD_SHARED_LIBS options is not supported on Windows.")
endif()
else()
option(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" OFF)
option(LLVM_BUILD_LLVM_C_DYLIB "Build libllvm-c re-export library (Darwin only)" OFF)
set(LLVM_BUILD_LLVM_DYLIB_default OFF)
if(LLVM_LINK_LLVM_DYLIB OR LLVM_BUILD_LLVM_C_DYLIB)
set(LLVM_BUILD_LLVM_DYLIB_default ON)
endif()
option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_BUILD_LLVM_DYLIB_default})
endif()
set(LLVM_BUILD_LLVM_DYLIB_default OFF)
if(LLVM_LINK_LLVM_DYLIB OR (LLVM_BUILD_LLVM_C_DYLIB AND NOT MSVC))
set(LLVM_BUILD_LLVM_DYLIB_default ON)

if (LLVM_LINK_LLVM_DYLIB AND BUILD_SHARED_LIBS)
message(FATAL_ERROR "Cannot enable BUILD_SHARED_LIBS with LLVM_LINK_LLVM_DYLIB. We recommend disabling BUILD_SHARED_LIBS.")
endif()
option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_BUILD_LLVM_DYLIB_default})

option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF)
if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND (LLVM_ENABLE_ASSERTIONS OR CMAKE_CONFIGURATION_TYPES)))
Expand Down Expand Up @@ -805,11 +820,7 @@ set(LLVM_SRPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/srpm")

get_source_info(${CMAKE_CURRENT_SOURCE_DIR} revision repository)
string(LENGTH "${revision}" revision_length)
if(revision MATCHES "^[0-9]+$" AND revision_length LESS 40)
set(LLVM_RPM_SPEC_REVISION "r${revision}")
else()
set(LLVM_RPM_SPEC_REVISION "${revision}")
endif()
set(LLVM_RPM_SPEC_REVISION "${revision}")

configure_file(
${LLVM_SRPM_USER_BINARY_SPECFILE}
Expand Down
2 changes: 1 addition & 1 deletion llvm/cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ macro(add_llvm_executable name)
llvm_update_compile_flags(${name})
endif()

if (ARG_SUPPORT_PLUGINS)
if (ARG_SUPPORT_PLUGINS AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
set(LLVM_NO_DEAD_STRIP On)
endif()

Expand Down
4 changes: 2 additions & 2 deletions llvm/cmake/modules/LLVM-Config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function(is_llvm_target_library library return_var)
string(TOUPPER "${LLVM_TARGETS_TO_BUILD}" targets)
elseif(ARG_OMITTED_TARGETS)
set(omitted_targets ${LLVM_ALL_TARGETS})
list(REMOVE_ITEM omitted_targets ${LLVM_TARGETS_TO_BUILD})
list(REMOVE_ITEM omitted_targets "${LLVM_TARGETS_TO_BUILD}")
string(TOUPPER "${omitted_targets}" targets)
else()
string(TOUPPER "${LLVM_ALL_TARGETS}" targets)
Expand Down Expand Up @@ -268,7 +268,7 @@ function(llvm_map_components_to_libnames out_libs)
# already processed
elseif( c STREQUAL "all" )
list(APPEND expanded_components ${LLVM_AVAILABLE_LIBS})
else( NOT idx LESS 0 )
else()
# Canonize the component name:
string(TOUPPER "${c}" capitalized)
list(FIND capitalized_libs LLVM${capitalized} lib_idx)
Expand Down
103 changes: 29 additions & 74 deletions llvm/cmake/modules/VersionFromVCS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,7 @@
# existence of certain subdirectories under SOURCE_DIR (if provided as an
# extra argument, otherwise uses CMAKE_CURRENT_SOURCE_DIR).

function(get_source_info_svn path revision repository)
# If svn is a bat file, find_program(Subversion) doesn't find it.
# Explicitly search for that here; Subversion_SVN_EXECUTABLE will override
# the find_program call in FindSubversion.cmake.
find_program(Subversion_SVN_EXECUTABLE NAMES svn svn.bat)
find_package(Subversion)

# Subversion module does not work with symlinks, see PR8437.
get_filename_component(realpath ${path} REALPATH)
if(Subversion_FOUND)
subversion_wc_info(${realpath} Project)
if(Project_WC_REVISION)
set(${revision} ${Project_WC_REVISION} PARENT_SCOPE)
endif()
if(Project_WC_URL)
set(${repository} ${Project_WC_URL} PARENT_SCOPE)
endif()
endif()
endfunction()

function(get_source_info_git path revision repository)
function(get_source_info path revision repository)
find_package(Git)
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --git-dir
Expand All @@ -34,61 +14,36 @@ function(get_source_info_git path revision repository)
if(git_result EQUAL 0)
string(STRIP "${git_output}" git_output)
get_filename_component(git_dir ${git_output} ABSOLUTE BASE_DIR ${path})
if(EXISTS "${git_dir}/svn/refs")
execute_process(COMMAND ${GIT_EXECUTABLE} svn info
WORKING_DIRECTORY ${path}
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_output)
if(git_result EQUAL 0)
string(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
"\\2" git_svn_rev "${git_output}")
set(${revision} ${git_svn_rev} PARENT_SCOPE)
string(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
"\\2" git_url "${git_output}")
set(${repository} ${git_url} PARENT_SCOPE)
endif()
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
WORKING_DIRECTORY ${path}
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_output)
if(git_result EQUAL 0)
string(STRIP "${git_output}" git_output)
set(${revision} ${git_output} PARENT_SCOPE)
endif()
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref --symbolic-full-name @{upstream}
WORKING_DIRECTORY ${path}
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_output
ERROR_QUIET)
if(git_result EQUAL 0)
string(REPLACE "/" ";" branch ${git_output})
list(GET branch 0 remote)
else()
set(remote "origin")
endif()
execute_process(COMMAND ${GIT_EXECUTABLE} remote get-url ${remote}
WORKING_DIRECTORY ${path}
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_output
ERROR_QUIET)
if(git_result EQUAL 0)
string(STRIP "${git_output}" git_output)
set(${repository} ${git_output} PARENT_SCOPE)
else()
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
WORKING_DIRECTORY ${path}
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_output)
if(git_result EQUAL 0)
string(STRIP "${git_output}" git_output)
set(${revision} ${git_output} PARENT_SCOPE)
endif()
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref --symbolic-full-name @{upstream}
WORKING_DIRECTORY ${path}
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_output
ERROR_QUIET)
if(git_result EQUAL 0)
string(REPLACE "/" ";" branch ${git_output})
list(GET branch 0 remote)
else()
set(remote "origin")
endif()
execute_process(COMMAND ${GIT_EXECUTABLE} remote get-url ${remote}
WORKING_DIRECTORY ${path}
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_output
ERROR_QUIET)
if(git_result EQUAL 0)
string(STRIP "${git_output}" git_output)
set(${repository} ${git_output} PARENT_SCOPE)
else()
set(${repository} ${path} PARENT_SCOPE)
endif()
set(${repository} ${path} PARENT_SCOPE)
endif()
endif()
endif()
endfunction()

function(get_source_info path revision repository)
if(EXISTS "${path}/.svn")
get_source_info_svn("${path}" revision_info repository_info)
else()
get_source_info_git("${path}" revision_info repository_info)
endif()
set(${repository} "${repository_info}" PARENT_SCOPE)
set(${revision} "${revision_info}" PARENT_SCOPE)
endfunction()
1 change: 1 addition & 0 deletions llvm/docs/BuildingADistribution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ LLVM. Even in this situation using *BUILD_SHARED_LIBS* is not supported. If you
want to distribute LLVM as a shared library for use in a tool, the recommended
method is using *LLVM_BUILD_LLVM_DYLIB*, and you can use *LLVM_DYLIB_COMPONENTS*
to configure which LLVM components are part of libLLVM.
Note: *LLVM_BUILD_LLVM_DYLIB* is not available on Windows.

Options for Optimizing LLVM
===========================
Expand Down
2 changes: 2 additions & 0 deletions llvm/docs/CMake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,13 @@ LLVM-specific variables
is also ON.
The components in the library can be customised by setting LLVM_DYLIB_COMPONENTS
to a list of the desired components.
This option is not available on Windows.

**LLVM_LINK_LLVM_DYLIB**:BOOL
If enabled, tools will be linked with the libLLVM shared library. Defaults
to OFF. Setting LLVM_LINK_LLVM_DYLIB to ON also sets LLVM_BUILD_LLVM_DYLIB
to ON.
This option is not available on Windows.

**BUILD_SHARED_LIBS**:BOOL
Flag indicating if each LLVM component (e.g. Support) is built as a shared
Expand Down
29 changes: 16 additions & 13 deletions llvm/docs/CommandGuide/llvm-objcopy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,19 @@ multiple file formats.
For MachO objects, ``<section>`` must be formatted as
``<segment name>,<section name>``.

.. option:: --redefine-sym <old>=<new>

Rename symbols called ``<old>`` to ``<new>`` in the output. Can be specified
multiple times to rename multiple symbols.

.. option:: --redefine-syms <filename>

Rename symbols in the output as described in the file ``<filename>``. In the
file, each line represents a single symbol to rename, with the old name and new
name separated by whitespace. Leading and trailing whitespace is ignored, as is
anything following a '#'. Can be specified multiple times to read names from
multiple files.

.. option:: --regex

If specified, symbol and section names specified by other switches are treated
Expand All @@ -94,6 +107,9 @@ multiple file formats.
Remove the specified section from the output. Can be specified multiple times
to remove multiple sections simultaneously.

For MachO objects, ``<section>`` must be formatted as
``<segment name>,<section name>``.

.. option:: --set-section-alignment <section>=<align>

Set the alignment of section ``<section>`` to `<align>``. Can be specified
Expand Down Expand Up @@ -378,19 +394,6 @@ them.

Preserve access and modification timestamps in the output.

.. option:: --redefine-sym <old>=<new>

Rename symbols called ``<old>`` to ``<new>`` in the output. Can be specified
multiple times to rename multiple symbols.

.. option:: --redefine-syms <filename>

Rename symbols in the output as described in the file ``<filename>``. In the
file, each line represents a single symbol to rename, with the old name and new
name separated by an equals sign. Leading and trailing whitespace is ignored,
as is anything following a '#'. Can be specified multiple times to read names
from multiple files.

.. option:: --rename-section <old>=<new>[,<flag>,...]

Rename sections called ``<old>`` to ``<new>`` in the output, and apply any
Expand Down
3 changes: 2 additions & 1 deletion llvm/docs/GettingStarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,8 @@ used by people developing LLVM.
| | default set of LLVM components that can be |
| | overridden with ``LLVM_DYLIB_COMPONENTS``. The |
| | default contains most of LLVM and is defined in |
| | ``tools/llvm-shlib/CMakelists.txt``. |
| | ``tools/llvm-shlib/CMakelists.txt``. This option is|
| | not avialable on Windows. |
+-------------------------+----------------------------------------------------+
| LLVM_OPTIMIZED_TABLEGEN | Builds a release tablegen that gets used during |
| | the LLVM build. This can dramatically speed up |
Expand Down
4 changes: 2 additions & 2 deletions llvm/docs/GlobalISel/Pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ involved in a bug.
Once the critical blocks have been identified, you can further increase the
resolution to the critical instructions by splitting the blocks like from:

.. code-block:: llvm
.. code-block:: none
bb1:
... instructions group 1 ...
... instructions group 2 ...
into:

.. code-block:: llvm
.. code-block:: none
bb1:
... instructions group 1 ...
Expand Down
32 changes: 19 additions & 13 deletions llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10240,7 +10240,7 @@ non-dereferenceable pointer. See the
Example:
""""""""

.. code-block:: llvm
.. code-block:: text

%w = i32 undef
%x = freeze i32 %w
Expand Down Expand Up @@ -12708,13 +12708,15 @@ floating-point type. Not all targets support all types however.
Overview:
"""""""""

The '``llvm.lround.*``' intrinsics returns the operand rounded to the
nearest integer.
The '``llvm.lround.*``' intrinsics return the operand rounded to the nearest
integer with ties away from zero.


Arguments:
""""""""""

The argument is a floating-point number and return is an integer type.
The argument is a floating-point number and the return value is an integer
type.

Semantics:
""""""""""
Expand Down Expand Up @@ -12742,13 +12744,14 @@ floating-point type. Not all targets support all types however.
Overview:
"""""""""

The '``llvm.llround.*``' intrinsics returns the operand rounded to the
nearest integer.
The '``llvm.llround.*``' intrinsics return the operand rounded to the nearest
integer with ties away from zero.

Arguments:
""""""""""

The argument is a floating-point number and return is an integer type.
The argument is a floating-point number and the return value is an integer
type.

Semantics:
""""""""""
Expand Down Expand Up @@ -12782,13 +12785,15 @@ floating-point type. Not all targets support all types however.
Overview:
"""""""""

The '``llvm.lrint.*``' intrinsics returns the operand rounded to the
nearest integer.
The '``llvm.lrint.*``' intrinsics return the operand rounded to the nearest
integer.


Arguments:
""""""""""

The argument is a floating-point number and return is an integer type.
The argument is a floating-point number and the return value is an integer
type.

Semantics:
""""""""""
Expand Down Expand Up @@ -12816,13 +12821,14 @@ floating-point type. Not all targets support all types however.
Overview:
"""""""""

The '``llvm.llrint.*``' intrinsics returns the operand rounded to the
nearest integer.
The '``llvm.llrint.*``' intrinsics return the operand rounded to the nearest
integer.

Arguments:
""""""""""

The argument is a floating-point number and return is an integer type.
The argument is a floating-point number and the return value is an integer
type.

Semantics:
""""""""""
Expand Down
Loading

0 comments on commit 9894965

Please sign in to comment.