Skip to content

Commit

Permalink
Overwritten with: b19c164 Remove dubious logic in bidirectional list …
Browse files Browse the repository at this point in the history
…scheduler

Based on upstream llvm 373958: 46d317f [Bitcode] Update naming of UNOP_NEG to UNOP_FNEG

Local (non-upstream) changes since 40fbaf4:
b19c164 Remove dubious logic in bidirectional list scheduler
8c7f063 Revert "[SimplifyCFG] FoldTwoEntryPHINode(): consider *total* speculation cost, not per-BB cost"
b24f8ac Revert "[AMDGPU] Run `unreachable-mbb-elimination` after isel to clean up PHIs."
2544d5d [LiveRangeCalc] Fixed findReachingDefs bug - test fixup
25e8457 Merge MIMG instructions
a1e75ec Revert "Merge MIMG instructions"
8c1a51e Revert "[AMDGPU] Use waterfall for readlane with non-uniform index"
35a70ca [AMDGPU] Remove waterfalls with dead readfirstlane intrinsics

Added AMD modification notices and removed non-LLVM directories and some GPL files.
  • Loading branch information
Tim Renouf committed Oct 11, 2019
2 parents 40fbaf4 + b19c164 commit 33e6f13
Show file tree
Hide file tree
Showing 807 changed files with 56,522 additions and 23,767 deletions.
6 changes: 5 additions & 1 deletion llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ endif()
# LLVM_EXTERNAL_${project}_SOURCE_DIR using LLVM_ALL_PROJECTS
# This allows an easy way of setting up a build directory for llvm and another
# one for llvm+clang+... using the same sources.
set(LLVM_ALL_PROJECTS "clang;clang-tools-extra;compiler-rt;debuginfo-tests;libclc;libcxx;libcxxabi;libunwind;lld;lldb;llgo;openmp;parallel-libs;polly;pstl")
set(LLVM_ALL_PROJECTS "clang;clang-tools-extra;compiler-rt;debuginfo-tests;libc;libclc;libcxx;libcxxabi;libunwind;lld;lldb;llgo;openmp;parallel-libs;polly;pstl")
set(LLVM_ENABLE_PROJECTS "" CACHE STRING
"Semicolon-separated list of projects to build (${LLVM_ALL_PROJECTS}), or \"all\".")
if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
Expand Down Expand Up @@ -1097,3 +1097,7 @@ if (LLVM_INCLUDE_BENCHMARKS)
add_subdirectory(utils/benchmark)
add_subdirectory(benchmarks)
endif()

if (LLVM_INCLUDE_UTILS AND LLVM_INCLUDE_TOOLS)
add_subdirectory(utils/llvm-locstats)
endif()
1 change: 1 addition & 0 deletions llvm/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ documentation setup.
If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.


Modifications Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved.
Notified per clause 4(b) of the license.
11 changes: 11 additions & 0 deletions llvm/cmake/modules/AddSphinxTarget.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ function (add_sphinx_target builder project)
COMPONENT "${project}-sphinx-man"
DESTINATION ${INSTALL_MANDIR}man1)

if(NOT LLVM_ENABLE_IDE)
add_llvm_install_targets("install-${SPHINX_TARGET_NAME}"
DEPENDS ${SPHINX_TARGET_NAME}
COMPONENT "${project}-sphinx-man")
endif()
elseif (builder STREQUAL html)
string(TOUPPER "${project}" project_upper)
set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html"
Expand All @@ -82,6 +87,12 @@ function (add_sphinx_target builder project)
install(DIRECTORY "${SPHINX_BUILD_DIR}/."
COMPONENT "${project}-sphinx-html"
DESTINATION "${${project_upper}_INSTALL_SPHINX_HTML_DIR}")

if(NOT LLVM_ENABLE_IDE)
add_llvm_install_targets("install-${SPHINX_TARGET_NAME}"
DEPENDS ${SPHINX_TARGET_NAME}
COMPONENT "${project}-sphinx-html")
endif()
else()
message(WARNING Installation of ${builder} not supported)
endif()
Expand Down
36 changes: 20 additions & 16 deletions llvm/cmake/modules/TableGen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function(tablegen project ofn)
file(RELATIVE_PATH ofn_rel
${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${ofn})
set(additional_cmdline
-o ${ofn_rel}.tmp
-o ${ofn_rel}
-d ${ofn_rel}.d
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
DEPFILE ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.d
Expand All @@ -34,7 +34,7 @@ function(tablegen project ofn)
file(GLOB local_tds "*.td")
file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td")
set(additional_cmdline
-o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
-o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
)
endif()

Expand All @@ -58,6 +58,15 @@ function(tablegen project ofn)
endif()
endif()

if (CMAKE_GENERATOR MATCHES "Visual Studio")
# Visual Studio has problems with llvm-tblgen's native --write-if-changed
# behavior. Since it doesn't do restat optimizations anyway, just don't
# pass --write-if-changed there.
set(tblgen_change_flag)
else()
set(tblgen_change_flag "--write-if-changed")
endif()

# We need both _TABLEGEN_TARGET and _TABLEGEN_EXE in the DEPENDS list
# (both the target and the file) to have .inc files rebuilt on
# a tablegen change, as cmake does not propagate file-level dependencies
Expand All @@ -67,11 +76,11 @@ function(tablegen project ofn)
# dependency twice in the result file when
# ("${${project}_TABLEGEN_TARGET}" STREQUAL "${${project}_TABLEGEN_EXE}")
# but lets us having smaller and cleaner code here.
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
# Generate tablegen output in a temporary file.
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}
${LLVM_TABLEGEN_FLAGS}
${LLVM_TARGET_DEFINITIONS_ABSOLUTE}
${tblgen_change_flag}
${additional_cmdline}
# The file in LLVM_TARGET_DEFINITIONS may be not in the current
# directory and local_tds may not contain it, so we must
Expand All @@ -81,20 +90,9 @@ function(tablegen project ofn)
${LLVM_TARGET_DEFINITIONS_ABSOLUTE}
COMMENT "Building ${ofn}..."
)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
# Only update the real output file if there are any differences.
# This prevents recompilation of all the files depending on it if there
# aren't any.
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
${CMAKE_CURRENT_BINARY_DIR}/${ofn}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
COMMENT "Updating ${ofn}..."
)

# `make clean' must remove all those generated files:
set_property(DIRECTORY APPEND
PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${ofn}.tmp ${ofn})
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${ofn})

set(TABLEGEN_OUTPUT ${TABLEGEN_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${ofn} PARENT_SCOPE)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${ofn} PROPERTIES
Expand Down Expand Up @@ -171,7 +169,13 @@ macro(add_tablegen target project)

install(TARGETS ${target}
${export_to_llvmexports}
COMPONENT ${target}
RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR})
if(NOT LLVM_ENABLE_IDE)
add_llvm_install_targets("install-${target}"
DEPENDS ${target}
COMPONENT ${target})
endif()
endif()
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})
endmacro()
1 change: 1 addition & 0 deletions llvm/docs/CommandGuide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ Developer Tools
llvm-build
llvm-exegesis
llvm-pdbutil
llvm-locstats
79 changes: 79 additions & 0 deletions llvm/docs/CommandGuide/llvm-locstats.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
llvm-locstats - calculate statistics on DWARF debug location
============================================================

.. program:: llvm-locstats

SYNOPSIS
--------

:program:`llvm-locstats` [*options*] [*filename*]

DESCRIPTION
-----------

:program:`llvm-locstats` works like a wrapper around :program:`llvm-dwarfdump`.
It parses :program:`llvm-dwarfdump` statistics regarding debug location by
pretty printing it in a more human readable way.

The line 0% shows the number and the percentage of DIEs with no location
information, but the line 100% shows the information for DIEs where there is
location information in all code section bytes (where the variable or parameter
is in the scope). The line 50-59% shows the number and the percentage of DIEs
where the location information is between 50 and 59 percentage of its scope
covered.

OPTIONS
-------

.. option:: -only-variables

Calculate the location statistics only for local variables.

.. option:: -only-formal-parameters

Calculate the location statistics only for formal parameters.

.. option:: -ignore-debug-entry-values

Ignore the location statistics on locations containing the
debug entry values DWARF operation.

EXIT STATUS
-----------

:program:`llvm-locstats` returns 0 if the input file were parsed
successfully. Otherwise, it returns 1.

OUTPUT EXAMPLE
--------------

.. code-block:: none
=================================================
Debug Location Statistics
=================================================
cov% samples percentage(~)
-------------------------------------------------
0% 1 16%
1-9% 0 0%
10-19% 0 0%
20-29% 0 0%
30-39% 0 0%
40-49% 0 0%
50-59% 1 16%
60-69% 0 0%
70-79% 0 0%
80-89% 1 16%
90-99% 0 0%
100% 3 50%
=================================================
-the number of debug variables processed: 6
-PC ranges covered: 81%
-------------------------------------------------
-total availability: 83%
=================================================
SEE ALSO
--------

:manpage:`llvm-dwarfdump(1)`
5 changes: 5 additions & 0 deletions llvm/docs/CommandGuide/llvm-objcopy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ multiple file formats.
Remove the specified section from the output. Can be specified multiple times
to remove multiple sections simultaneously.

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

Set the alignment of section ``<section>`` to `<align>``. Can be specified
multiple times to update multiple sections.

.. option:: --strip-all-gnu

Remove all symbols, debug sections and relocations from the output. This option
Expand Down
13 changes: 4 additions & 9 deletions llvm/docs/FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ Frequently Asked Questions (FAQ)
License
=======

Does the University of Illinois Open Source License really qualify as an "open source" license?
-----------------------------------------------------------------------------------------------
Yes, the license is `certified
<http://www.opensource.org/licenses/UoI-NCSA.php>`_ by the Open Source
Initiative (OSI).


Can I modify LLVM source code and redistribute the modified source?
-------------------------------------------------------------------
Yes. The modified source distribution must retain the copyright notice and
follow the three bulleted conditions listed in the `LLVM license
follow the conditions listed in the `LLVM license
<http://llvm.org/svn/llvm-project/llvm/trunk/LICENSE.TXT>`_.


Expand All @@ -41,10 +34,12 @@ the STL.
How portable is the LLVM source code?
-------------------------------------
The LLVM source code should be portable to most modern Unix-like operating
systems. Most of the code is written in standard C++ with operating system
systems. LLVM has also excellent support on Windows systems.
Most of the code is written in standard C++ with operating system
services abstracted to a support library. The tools required to build and
test LLVM have been ported to a plethora of platforms.


What API do I use to store a value to one of the virtual registers in LLVM IR's SSA representation?
---------------------------------------------------------------------------------------------------

Expand Down
34 changes: 34 additions & 0 deletions llvm/docs/GettingStartedTutorials.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Getting Started/Tutorials
=========================

For those new to the LLVM system.

.. toctree::
:hidden:

Frontend/PerformanceTips
GettingStarted
GettingStartedVS
ProgrammersManual
tutorial/index

:doc:`GettingStarted`
Discusses how to get up and running quickly with the LLVM infrastructure.
Everything from unpacking and compilation of the distribution to execution
of some tools.

:doc:`tutorial/index`
Tutorials about using LLVM. Includes a tutorial about making a custom
language with LLVM.

:doc:`ProgrammersManual`
Introduction to the general layout of the LLVM sourcebase, important classes
and APIs, and some tips & tricks.

:doc:`Frontend/PerformanceTips`
A collection of tips for frontend authors on how to generate IR
which LLVM is able to effectively optimize.

:doc:`GettingStartedVS`
An addendum to the main Getting Started guide for those using Visual Studio
on Windows.
Loading

0 comments on commit 33e6f13

Please sign in to comment.