summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* make XFAIL, REQUIRES, and UNSUPPORTED support multi-line expressionsEric Fiselier2019-01-203-3/+44
| | | | llvm-svn: 351668
* Update structured references to the license to the new license.Chandler Carruth2019-01-191-2/+2
| | | | | | | | Since these are intended to be short and succinct, I've used the SPDX full name. It's human readable, but formally agreed upon and will be part of the SPDX spec for licenses. llvm-svn: 351649
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-19100-404/+303
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [X86] Deduplicate static calling convention helpers for code size, NFCReid Kleckner2019-01-191-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Right now we include ${TGT}GenCallingConv.inc once per each instruction selection method implemented by ${TGT}: - ${TGT}ISelLowering.cpp - ${TGT}CallLowering.cpp - ${TGT}FastISel.cpp Instead, add a mechanism to tablegen for marking a particular convention as "External", which causes tablegen to emit into the ::llvm namespace, instead of as a static helper. This allows us to provide a header to forward declare it, so we can simply call the function from all the places it is referenced. Typically the calling convention analyzer is called indirectly, so it doesn't benefit from inlining. This saves a bit of final binary size, but mostly just saves object file size: before after diff artifact 12852K 12492K -360K X86ISelLowering.cpp.obj 4640K 4280K -360K X86FastISel.cpp.obj 1704K 2092K +388K X86CallingConv.cpp.obj 52448K 52336K -112K llc.exe I didn't collect before numbers for X86CallLowering.cpp.obj, which is for GlobalISel, but we should save 360K there as well. This patch applies the strategy to the X86 backend, but there is no reason it couldn't be applied to the other backends that implement multiple ISel strategies, like AArch64. Reviewers: craig.topper, hfinkel, efriedma Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D56883 llvm-svn: 351616
* Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [llvm]Nico Weber2019-01-193-4/+2
| | | | | | | | | | | | | | | r291284 added a nice mechanism to consistently pass CMake on/off toggles to lit. This change uses it for LLVM_LIBXML2_ENABLED too (which was added around the same time and doesn't use the new system yet). Also alphabetically sort the list passed to llvm_canonicalize_cmake_booleans() in llvm/test/CMakeLists.txt. No intended behavior change. Differential Revision: https://reviews.llvm.org/D56912 llvm-svn: 351615
* [ADT] Add streaming operators for llvm::OptionalPavel Labath2019-01-181-1/+14
| | | | | | | | | | | | | | | | | | | | | | | Summary: The operators simply print the underlying value or "None". The trickier part of this patch is making sure the streaming operators work even in unit tests (which was my primary motivation, though I can also see them being useful elsewhere). Since the stream operator was a template, implicit conversions did not kick in, and our gtest glue code was explicitly introducing an implicit conversion to make sure other implicit conversions do not kick in :P. I resolve that by specializing llvm_gtest::StreamSwitch for llvm:Optional<T>. Reviewers: sammccall, dblaikie Reviewed By: sammccall Subscribers: mgorny, dexonsmith, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D56795 llvm-svn: 351548
* gn build: unbreak mac (and maybe win) after r351258, r351277Nico Weber2019-01-182-3/+9
| | | | | | | | | | | | | The check-hwasan build files assert that current_os == "linux" || current_os == "android", so pull it in only there. ar is unused on mac, so don't set it in the stage2 toolchain. (It'd be nicer to use llvm-libtool on mac instead of host libtool, but llvm-libtool doesn't seem to understand the -no_warning_for_no_symbols flag.) Differential Revision: https://reviews.llvm.org/D56898 llvm-svn: 351519
* gn build: Merge r351499Nico Weber2019-01-181-0/+1
| | | | llvm-svn: 351516
* mac: Correctly disable tools/lto tests when building with LLVM_ENABLE_PIC=OFFNico Weber2019-01-181-1/+0
| | | | | | | | | | | | | | | | llvm/tools sets LLVM_TOOL_LTO_BUILD to Off if LLVM_ENABLE_PIC=OFF, but that's not visible in llvm/test. r289662 added the llvm_tool_lto_build lit parameter, there the intent was to use it with an explicit -DLLVM_TOOL_LTO_BUILD=OFF, which is visible globally. On the review for that (D27739), a mild preference was expressed for using a lit parameter over checking the existence of libLTO.dylib. Since that works with the LLVM_ENABLE_PIC=OFF case too and since it matches what we do for the gold plugin, switch to that approach. Differential Revision: https://reviews.llvm.org/D56805 llvm-svn: 351515
* llvm build: Merge r351448Nico Weber2019-01-172-0/+2
| | | | llvm-svn: 351469
* build_llvm_package.bat: Run more testsHans Wennborg2019-01-171-5/+13
| | | | llvm-svn: 351436
* gn build: Add headers to compiler-rt build files.Peter Collingbourne2019-01-165-1/+104
| | | | | | Also fix sort order in llvm/lib/CodeGen/GlobalISel/BUILD.gn. llvm-svn: 351367
* Revert r351324 "Build LLVM-C.dll by default on windows and enable in release ↵Hans Wennborg2019-01-161-11/+1
| | | | | | | | | | | | | | | | | package" This broke the build, ending up with too long command-lines when invoking gen-mscv-exports.py. > As it says in the subject, should have gone long enough now that this > should be safe. This will greatly simplify dealing with LLVM for people > that just want to use the C API on windows. This is a follow up from > D35077. > > Patch by Jakob Bornecrantz! > > Differential revision: https://reviews.llvm.org/D56774 llvm-svn: 351329
* Build LLVM-C.dll by default on windows and enable in release packageHans Wennborg2019-01-161-1/+11
| | | | | | | | | | | | | As it says in the subject, should have gone long enough now that this should be safe. This will greatly simplify dealing with LLVM for people that just want to use the C API on windows. This is a follow up from D35077. Patch by Jakob Bornecrantz! Differential revision: https://reviews.llvm.org/D56774 llvm-svn: 351324
* Bump the trunk version to 9.0.0svnHans Wennborg2019-01-161-2/+2
| | | | llvm-svn: 351320
* Include lldb in Win snapshots again (PR37307)Hans Wennborg2019-01-161-7/+15
| | | | llvm-svn: 351309
* gn build: Merge r351283.Peter Collingbourne2019-01-162-0/+3
| | | | llvm-svn: 351293
* gn build: Add check-hwasan target.Peter Collingbourne2019-01-166-14/+231
| | | | | | | | | | | | | | | | | | | | The Android sanitizer tests are currently some of the most difficult to run correctly, requiring at least 3 build directories which have to be configured in just the right way and built in the correct order (see e.g. [1] and the functions that it calls). This patch adds a check-hwasan target which greatly simplifies running the hwasan tests for gn users, taking advantage of its support for multiple toolchains. With this the tests can be run simply by setting an NDK path and running "ninja check-hwasan" with a compatible Android device connected. The Linux/x86_64 and Android/aarch64 targets are tested in parallel. [1] https://github.com/llvm/llvm-zorg/blob/master/zorg/buildbot/builders/sanitizers/buildbot_android.sh Differential Revision: https://reviews.llvm.org/D56713 llvm-svn: 351277
* gn build: Add a stage2 host toolchain and make the hwasan runtime buildable ↵Peter Collingbourne2019-01-155-20/+65
| | | | | | | | on x86_64 Linux. Differential Revision: https://reviews.llvm.org/D56711 llvm-svn: 351258
* gn build: Add a resource_dir.gni file.Peter Collingbourne2019-01-153-7/+8
| | | | | | | | | | | The path to the resource directory will end up being used in several more places once the support for running check-hwasan lands. This moves the definition to a central location so that it can be used from those places. Differential Revision: https://reviews.llvm.org/D56700 llvm-svn: 351255
* gn build: Move target flags from toolchain to a .gni file.Peter Collingbourne2019-01-154-29/+54
| | | | | | | | | While here, add a use_lld flag and default it to true when using clang on non-mac. Differential Revision: https://reviews.llvm.org/D56710 llvm-svn: 351248
* gn build: Add build files for ↵Peter Collingbourne2019-01-156-1/+235
| | | | | | | | | | compiler-rt/lib/{hwasan,interception,sanitizer_common,ubsan}. This allows the hwasan runtime to be built for Android aarch64. Differential Revision: https://reviews.llvm.org/D56628 llvm-svn: 351246
* gn build: Merge r351216, r351228.Peter Collingbourne2019-01-152-0/+2
| | | | llvm-svn: 351242
* [Nios2] Remove Nios2 backendCraig Topper2019-01-151-1/+0
| | | | | | | | As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months. Differential Revision: https://reviews.llvm.org/D56691 llvm-svn: 351231
* gn build: Don't assume valgrind.h exists on LinuxHans Wennborg2019-01-151-6/+1
| | | | | | | | It didn't on my machine, so defaulting it to off seems better. Differential revision: https://reviews.llvm.org/D56727 llvm-svn: 351202
* gn build: Rename llvm_host_triple to llvm_current_triple and have it use ↵Peter Collingbourne2019-01-156-13/+29
| | | | | | | | | | | | | | | | | | current_{cpu,os}. This makes e.g. ToolChain::isCrossCompiling() in clang/lib/Driver/ToolChain.cpp return the correct result if the compiler was cross-compiled. This change also affects llvm_default_target_triple, so cross-compiled compilers default to targeting the cross-compilation target, which makes more sense than the host that the compiler was compiled on. This change will also be necessary in order for the correct triples to appear in generated lit files for non-native targets. Differential Revision: https://reviews.llvm.org/D56696 llvm-svn: 351168
* gn build: Make a couple of improvements to the unix toolchain.Peter Collingbourne2019-01-151-2/+12
| | | | | | | | | | Add an asm tool (will be required for building sanitizer_common on x64) and set a soname for DSOs so that anything that links against them gets the correct DT_NEEDED. Differential Revision: https://reviews.llvm.org/D56705 llvm-svn: 351167
* gn build: Switch to using current_os in lib/Support/BUILD.gn.Peter Collingbourne2019-01-151-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D56704 llvm-svn: 351166
* gn build: Split no-RTTI flag into a config.Peter Collingbourne2019-01-152-5/+10
| | | | | | | | | Some of the sanitizer runtime code needs to be built with RTTI; this allows that code to opt in to RTTI. Differential Revision: https://reviews.llvm.org/D56627 llvm-svn: 351155
* gn build: Stop defining LLVM_ON_UNIX globally.Peter Collingbourne2019-01-151-5/+0
| | | | | | | | This macro is already being defined in llvm-config.h. Differential Revision: https://reviews.llvm.org/D56626 llvm-svn: 351154
* [lit] llvm-lit.in: specify file encoding to UTF-8George Karpenkov2019-01-141-0/+1
| | | | | | | | | | | | | | | | This is needed because otherwise if source dir is at location whose path contains non-ASCII character then python will complain about SyntaxError. SyntaxError: Non-ASCII character '\xc4' in file /home/D?vis/libc++/src/build/bin/llvm-lit on line 16, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details Patch by davispuh Differential Revision: https://reviews.llvm.org/D50201 llvm-svn: 351113
* gn build: Unbreak mac build after r350977Nico Weber2019-01-141-1/+3
| | | | llvm-svn: 351090
* gn build: Fix path to gn.py in docsNico Weber2019-01-142-3/+3
| | | | llvm-svn: 351088
* gn build: svn propset svn:executable on utils/gn/gn.pyNico Weber2019-01-141-0/+0
| | | | llvm-svn: 351085
* gn build: Add gn.py wrapper script that adds --dotfile= and --root= parametersNico Weber2019-01-143-10/+50
| | | | | | | | | | Since people weren't enthused about moving the .gn file to the toplevel in D56419, here's a script to make gn at least somewhat more pleasant to invoke (useful for gn clean, gn args --list, gn desc, etc). Differential Revision: https://reviews.llvm.org/D56565 llvm-svn: 351064
* Detect incorrect FileCheck variable CLI definitionThomas Preud'homme2019-01-141-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: While the backend code of FileCheck relies on definition of variable from the command-line to have an equal sign '=' and a variable name before that, the frontend does not actually enforce it. This leads to FileCheck crashing when invoked with invalid syntax for the -D option. This patch adds the missing validation in the frontend. It also makes the -D option an AlwaysPrefix option to be able to detect -D=FOO as being a define without variable and -D as missing its value. Copyright: - Linaro (changes in version 2 of revision D55940) - GraphCore (changes in later versions) Reviewers: jdenny Subscribers: JonChesterfield, hiraditya, kristina, probinson, llvm-commits Differential Revision: https://reviews.llvm.org/D55940 llvm-svn: 351039
* Remove TypeBuilder.h, and fix the few locations using it.James Y Knight2019-01-131-1/+0
| | | | | | | | | | | | | | This shortcut mechanism for creating types was added 10 years ago, but has seen almost no uptake since then, neither internally nor in external projects. The very small number of characters saved by using it does not seem worth the mental overhead of an additional type-creation API, so, delete it. Differential Revision: https://reviews.llvm.org/D56573 llvm-svn: 351020
* gn build: Unbreak Windows buildNico Weber2019-01-122-3/+3
| | | | | | | | | | | | I didn't break all that much during upstreaming, just needs two small fixes: - fix spelling of MCJITTests.def file - make libLTO a shared_library to put it in bin/ on Windows where it is in the CMake build too Differential Revision: https://reviews.llvm.org/D56630 llvm-svn: 351004
* gn build: Add a stage2 toolchain for Android.Peter Collingbourne2019-01-116-28/+96
| | | | | | | | | This makes it possible to build llvm-symbolizer for Android, which is one of the prerequisites for running the sanitizer tests on Android. Differential Revision: https://reviews.llvm.org/D56577 llvm-svn: 350979
* gn build: Create a template for unix toolchains.Peter Collingbourne2019-01-111-96/+112
| | | | | | | | | | Also change the toolchain description to use current_os instead of host_os so that the template can be used for cross builds, and add a current_os to the win toolchain to match the unix toolchain. Differential Revision: https://reviews.llvm.org/D56576 llvm-svn: 350977
* gn build: Merge r350958.Peter Collingbourne2019-01-112-3/+13
| | | | llvm-svn: 350974
* gn build: Create a variable for the host toolchain and start using it in the ↵Peter Collingbourne2019-01-113-4/+5
| | | | | | | | tblgen template. Differential Revision: https://reviews.llvm.org/D56575 llvm-svn: 350964
* gn build: s/root_out_dir/root_build_dir/g in ↵Peter Collingbourne2019-01-111-2/+2
| | | | | | | | | | llvm/utils/gn/build/write_cmake_config.gni. This makes the generated files go to the right place when using a non-default toolchain. Differential Revision: https://reviews.llvm.org/D56427 llvm-svn: 350963
* gn build: Add a template for calling write_cmake_config.pyNico Weber2019-01-1013-276/+207
| | | | | | | | No behavior change. Differential Revision: https://reviews.llvm.org/D56487 llvm-svn: 350905
* gn build: Merge r350852Nico Weber2019-01-102-3/+3
| | | | llvm-svn: 350904
* gn build: Use "git rev-parse --git-dir" to discover the path to the .git ↵Peter Collingbourne2019-01-101-7/+8
| | | | | | | | | | directory. This makes it compatible with worktrees. Differential Revision: https://reviews.llvm.org/D56422 llvm-svn: 350897
* gn build: Merge r350893Nico Weber2019-01-101-0/+1
| | | | llvm-svn: 350894
* [lit] Make it possible for the lit test suite to pass withDan Liew2019-01-101-1/+1
| | | | | | | | | `FILECHECK_OPTS=-v` set in the environment. Follow up to r350850 as requested by Joel E. Denny in https://reviews.llvm.org/D56541 . llvm-svn: 350854
* gn build: Merge r350819Nico Weber2019-01-101-0/+1
| | | | llvm-svn: 350829
* Fix visualization of intrusive reference counted objects in MSVC.Aaron Ballman2019-01-091-3/+3
| | | | llvm-svn: 350748
OpenPOWER on IntegriCloud