summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [CUDA] Don't try to run sanitizers on NVPTX.Justin Lebar2016-09-152-0/+18
| | | | | | | | | | | | | | | | Summary: Sanitizers aren't supported on NVPTX -- don't try to run them. This lets you e.g. pass -fsanitize=address and get asan on your host code. Reviewers: kcc Subscribers: cfe-commits, tra, jhen Differential Revision: https://reviews.llvm.org/D24640 llvm-svn: 281680
* [asan] fix window buildKostya Serebryany2016-09-151-0/+2
| | | | llvm-svn: 281679
* Check /pdb output using llvm-pdbdump.Rui Ueyama2016-09-151-0/+86
| | | | | | | | | test/COFF/rsds.test checks only RSDS directory in a DLL and didn't check the validity of the PDF file produced. (Technically the produced PDB is not valid because it is really a stub, but this test is still good to have.) llvm-svn: 281678
* [asan] provide dummy implementations for __sanitizer_cov_trace_pc_*Kostya Serebryany2016-09-152-0/+9
| | | | llvm-svn: 281677
* build_llvm_package.bat: Update to VS2015 and include LLDBHans Wennborg2016-09-151-9/+12
| | | | llvm-svn: 281676
* [asan] Reenable 64-bit allocator on android/aarch64.Evgeniy Stepanov2016-09-152-16/+39
| | | | | | This is a re-commit of r281371, with updated tests. llvm-svn: 281674
* [libc++] Fix and document visibility attributes for Clang, GCC and Windows.Eric Fiselier2016-09-1513-149/+229
| | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes a number of problems with the visibility macros across GCC (on Unix) and Windows (DLL import/export semantics). All of the visibility macros are now documented under `DesignDocs/VisibilityMacros.rst`. Now I'll no longer forget the subtleties of each! This patch adds two new visibility macros: * `_LIBCPP_ENUM_VIS` for controlling the typeinfo of enum types. Only Clang supports this. * `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` for redefining visibility on explicit instantiation declarations. Clang and Windows require this. After applying this patch GCC only emits one -Wattribute warning opposed to 30+. Reviewers: mclow.lists, EricWF Subscribers: beanz, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D24602 llvm-svn: 281673
* [InstCombine] move folds for icmp (sh C2, Y), C1 in with other icmp+sh ↵Sanjay Patel2016-09-152-31/+25
| | | | | | folds; NFCI llvm-svn: 281672
* Fix old copy-n-paste errors.Rui Ueyama2016-09-152-4/+4
| | | | llvm-svn: 281671
* Create PDB.h and move code to remove unnecessary #includes.Rui Ueyama2016-09-156-8/+33
| | | | llvm-svn: 281670
* [Sema] Allow shifting a scalar operand by a vector operand.Akira Hatanaka2016-09-153-5/+233
| | | | | | | | | | | | r278501 inadvertently introduced a bug in which it disallowed shifting scalar operands by vector operands when not compiling for OpenCL. This commit fixes it. Patch by Vladimir Yakovlev. Differential Revision: https://reviews.llvm.org/D24467 llvm-svn: 281669
* [sanitizer] Fixup 2: Do not introduce __sanitizer namespace globallyAnna Zaks2016-09-151-0/+1
| | | | | | This got committed by mistake. Should fix some bots. llvm-svn: 281668
* [libFuzzer] make caller-callee feedback work with trace-pc-guardKostya Serebryany2016-09-155-1/+17
| | | | llvm-svn: 281667
* Simplify Clang's version number configuration in CMake.David L. Jones2016-09-154-42/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the Clang version is computed as follows: 1. LLVM defines major, minor, and patch versions, all statically set. Today, these are 4, 0, and 0, respectively. 2. The static version numbers are combined into PACKAGE_VERSION along with a suffix, so the result today looks like "4.0.0svn". 3. Clang extracts CLANG_VERSION from PACKAGE_VERSION using a regexp. The regexp allows the patch level to omitted, and drops any non-digit trailing values. Today, this result looks like "4.0.0". 4. CLANG_VERSION is then split further into CLANG_VERSION_MAJOR and CLANG_VERSION_MINOR. Today, these resolve to 4 and 0, respectively. 5. If CLANG_VERSION matches a regexp with three version components, then CLANG_VERSION_PATCHLEVEL is extracted and the CLANG_HAS_VERSION_PATCHLEVEL variable is set to 1. Today, these values are 0 and 1, respectively. 6. The CLANG_VERSION_* variables (and CLANG_HAS_VERSION_PATCHLEVEL) are configured into [llvm/tools/clang/]include/clang/Basic/Version.inc verbatim by CMake. 7. In [llvm/tools/clang/]include/clang/Basic/Version.h, macros are defined conditionally, based on CLANG_HAS_VERSION_PATCHLEVEL, to compute CLANG_VERSION_STRING as either a two- or three-level version number. Today, this value is "4.0.0", because despite the patchlevel being 0, it was matched by regexp and is thus "HAS"ed by the preprocessor. This string is then used wherever Clang's "version" is needed [*]. [*] Including, notably, by compiler-rt, for computing its installation path. This change collapses steps 2-5 by defaulting Clang to use LLVM's (non-string) version components for the Clang version (see [*] for why not PACKAGE_VERSION), and collapses steps 6 and 7 by simply writing CLANG_VERSION_STRING into Version.inc. The Clang version today always uses the patchlevel form, so the collapsed Version.inc does not have logic for a version without a patch level. Historically speaking, this technique began with the VER file in r82085 (which survives in the form of the regexp in #3). The major, minor, and patchlevel versions were introduced by r106863 (which remains in #4-6). The VER file itself was deleted in favor of the LLVM version number in r106914. On the LLVM side, the individual LLVM_VERSION_MAJOR, LLVM_VERSION_MINOR, and PACKAGE_VERSION weren't introduced for nearly two more years, until r150405. llvm-svn: 281666
* [sanitizer-coverage] make trace-pc-guard and indirect-call work togetherKostya Serebryany2016-09-153-3/+7
| | | | llvm-svn: 281665
* [codeview] Optimize the size of defranges with gapsReid Kleckner2016-09-153-5/+318
| | | | | | | | | For small, discontiguous local variable regions, CodeView can use a single defrange record with a gap, rather than having two defrange records. I expect that this optimization will only have a minor impact on debug info size. llvm-svn: 281664
* [InstCombine] allow icmp (shr/shl) folds for vectorsSanjay Patel2016-09-154-25/+40
| | | | | | | | | | | | These 2 helper functions were already using APInt internally, so just change the API and caller to allow folds for splats. The scalar regression tests look quite thorough, so I just added a couple of tests to prove that vectors are handled too. These folds should be grouped with the other cmp+shift folds though. That can be an NFC follow-up. llvm-svn: 281663
* Allow ArchSpec to take a StringRef.Zachary Turner2016-09-153-108/+152
| | | | llvm-svn: 281662
* [cmake] Don't depend on lldb-server unless it's built.Zachary Turner2016-09-151-1/+6
| | | | llvm-svn: 281661
* Error out instead of producing a corrupt PT_LOAD.Rafael Espindola2016-09-152-3/+16
| | | | | | | What bfd and gold do is give up in putting the headers in the PT_LOAD and just start the PT_LOAD in the second page. llvm-svn: 281660
* [sanitizer] Fixup: Do not introduce __sanitizer namespace globallyAnna Zaks2016-09-151-0/+2
| | | | | | Use the namespace in asan_win_dll_thunk.cc to fix the Windows bot. llvm-svn: 281659
* [compiler-rt] Remove the system includes from __sanitizer namespaceAnna Zaks2016-09-151-2/+2
| | | | llvm-svn: 281658
* [compiler-rt] Do not introduce __sanitizer namespace globallyAnna Zaks2016-09-1527-21/+78
| | | | | | | | | | | | The definitions in sanitizer_common may conflict with definitions from system headers because: The runtime includes the system headers after the project headers (as per LLVM coding guidelines). lib/sanitizer_common/sanitizer_internal_defs.h pollutes the namespace of everything defined after it, which is all/most of the sanitizer .h and .cc files and the included system headers with: using namespace __sanitizer; // NOLINT This patch solves the problem by introducing the namespace only within the sanitizer namespaces as proposed by Dmitry. Differential Revision: https://reviews.llvm.org/D21947 llvm-svn: 281657
* [sanitizers] DLAddr Symbolizer should fail if demangle failsAnna Zaks2016-09-151-1/+2
| | | | | | | This can case crashes in high verbosity mode when demangling fails. Not including a test case since this is hard to reproduce. llvm-svn: 281656
* regenerate checksSanjay Patel2016-09-151-227/+310
| | | | llvm-svn: 281655
* [SE] Fix config bug with CUDA testsJason Henline2016-09-152-1/+1
| | | | | | | | | | | | | | | | | Summary: It turns out CMake errors out if a processed directory contains source files that are not used. This was causing an error with the CUDATest.cpp file when configuring StreamExecutor with the CUDA platform disabled. Moving CUDATest.cpp to its own directory fixes this problem. Reviewers: jlebar, jprice Subscribers: beanz, mgorny, jlebar, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24618 llvm-svn: 281654
* [GlobalOpt] Dead Eliminate declarationsMehdi Amini2016-09-152-2/+9
| | | | | | | | | | | | GlobalOpt is already dead-code-eliminating global definitions. With this change it also takes care of declarations. Hopefully this should make it now a strict superset of GlobalDCE. This is important for LTO/ThinLTO as we don't want the linker to see "undefined reference" when it processes the input files: it could prevent proper internalization (or even load an extra file from a static archive, changing the behavior of the program!). llvm-svn: 281653
* Fixing bot failuresChris Bieneman2016-09-151-1/+3
| | | | | | Need to only add debugserver as a test dependency on Darwin. llvm-svn: 281652
* [LIT] First pass of LLDB LIT supportChris Bieneman2016-09-1512-2/+255
| | | | | | | | | | | | | | | | | | | | | Summary: This patch supplies basic infrastructure for LLDB to use LIT, and ports a few basic test cases from the LLDB test suite into LIT. With this patch the LLDB lit system is not capable or intended to fully replace the existing LLDB test suite, but this first patch enables people to write lit tests for LLDB. The lit substitution for %cc and %cxx default to the host compiler unless the CMake option LLDB_TEST_CLANG is On, in which case the in-tree clang will be used. The target check-lldb-lit will run all lit tests including the lit-based executor for the unit tests. Alternatively there is a target generated for each subdirectory under the lit directory, so check-lldb-unit and check-lldb-expr will run just the tests under their respective directories. The ported tests are not removed from the existing suite, and should not be until such a time when the lit runner is mature and in use by bots and workflows. Reviewers: zturner, labath, jingham, tfiala Subscribers: beanz, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D24591 llvm-svn: 281651
* [InstCombine] Do not RAUW a constant GEPDavid Majnemer2016-09-152-1/+21
| | | | | | | | canRewriteGEPAsOffset expects to process instructions, not constants. This fixes PR30342. llvm-svn: 281650
* [AArch64] Support for FP FMA when -ffp-contract=fastEvandro Menezes2016-09-152-3/+17
| | | | | | | | | | | | Currently, the machine combiner can proceed matching when -ffast-math is on. It should also match when only -ffp-contract=fast is specified as was the case before when DAGCombiner was doing the job. Patch by: Abderrazek Zaafrani <a.zaafrani@samsung.com>. Differential Revision: https://reviews.llvm.org/D24366 llvm-svn: 281649
* clang-format VS plugin: upgrade the project files to VS2015Hans Wennborg2016-09-153-4/+6
| | | | | | | The plugin itself runs on previous VS versions, but this enables it to be built with VS2015. llvm-svn: 281648
* Make sure we create all necessary PT_LOADs.Rafael Espindola2016-09-152-1/+36
| | | | | | We were some times stopping early when using linker scripts. llvm-svn: 281647
* [ELF] - Linkerscript: implemented SORT_BY_INIT_PRIORITY.George Rimar2016-09-156-14/+47
| | | | | | | | | | | This is PR30386, SORT_BY_INIT_PRIORITY is a keyword can be used to sort sections by numerical value of the GCC init_priority attribute encoded in the section name. Differential revision: https://reviews.llvm.org/D24611 llvm-svn: 281646
* Revert "[ARM] Promote small global constants to constant pools"Evgeniy Stepanov2016-09-155-264/+1
| | | | | | This reverts r281604, which adds text relocations to ARM binaries. llvm-svn: 281645
* [InstCombine] simplify code; NFCISanjay Patel2016-09-151-14/+7
| | | | llvm-svn: 281644
* Use SuperBlock struct defined in MSFCommon.h.Rui Ueyama2016-09-151-24/+17
| | | | llvm-svn: 281643
* Convert ArchSpec::ParseMachOCPUDashSubtypeTriple to use StringRef.Zachary Turner2016-09-153-48/+37
| | | | | | | | | | | | | This makes the code easier to grok, and since this is a very low level function it also is very helpful to have this take a StringRef since it means anyone higher up the chain who has a StringRef would have to first convert it to a null-terminated string. This way it can work equally well with StringRefs or const char*'s, which will enable the conversion of higher up functions to StringRef. Tested on Windows, Linux, and OSX and saw no regressions. llvm-svn: 281642
* [libc++] Avoid <memory> include in locale_win32.hShoaib Meenai2016-09-152-5/+6
| | | | | | | | | | | | | | | | | | | | | | | When `_LIBCPP_NO_EXCEPTIONS` is defined, we end up with compile errors when targeting MSVCRT: * Code includes `<new>` * `<new>` includes `<cstdlib>` in order to get `abort` * `<cstdlib>` includes `<stdlib.h>`, _before_ the `using ::abort` * `<stdlib.h>` includes `locale_win32.h` * `locale_win32.h` includes `<memory>` * `<memory>` includes `<stdexcept>` * `<stdexcept>` includes `<cstdlib` for `abort`, but that inclusion gets (correctly) ignored because of header guards * `<stdexcept>` references `_VSTD::abort`, which isn't declared The easiest solution is to make `locale_win32.h` not include `<memory>`, by removing the use of `unique_ptr` and manually restoring the locale instead. Differential Revision: https://reviews.llvm.org/D24374 llvm-svn: 281641
* [PM] Port CFGViewer and CFGPrinter to the new Pass ManagerSriraman Tallam2016-09-157-56/+110
| | | | | | Differential Revision: https://reviews.llvm.org/D24592 llvm-svn: 281640
* added LLDB_PYTHON_TESTSUITE_ARCH Xcode variableTodd Fiala2016-09-151-2/+6
| | | | | | | | | | | This Xcode build variable defaults to x86_64. It can be set to i386 to cause the lldb-python-test-suite target run the tests in the specified architecture. This flag is being added for the zorg build script so that Green Dragon can run the test suite against both x86_64 and i386 macOS targets. llvm-svn: 281639
* [pdb] Write the IPI stream.Zachary Turner2016-09-1510-8/+72
| | | | | | | | The IPI stream is structurally identical to the TPI stream, but it contains different record types. So we just re-use the TPI writing code. llvm-svn: 281638
* fix function names; NFCSanjay Patel2016-09-151-34/+34
| | | | llvm-svn: 281637
* [pdb] Fix the TPI stream size computation.Zachary Turner2016-09-151-2/+1
| | | | | | | | We were inadvertently adding the size of the hash value stream to the size of the TPI stream, even though the hash value stream is an entirely separate stream. llvm-svn: 281636
* [SE] Support CUDA dynamic shared memoryJason Henline2016-09-153-7/+254
| | | | | | | | | | | | | | Summary: Add proper handling for shared memory arguments in the CUDA platform. Also add in unit tests for CUDA. Reviewers: jlebar Subscribers: beanz, mgorny, jprice, jlebar, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24596 llvm-svn: 281635
* [libFuzzer] fix the build for AFLDriverTestKostya Serebryany2016-09-151-1/+1
| | | | llvm-svn: 281633
* Reapply: Silence false positive diagnostics regarding passing an object of ↵Aaron Ballman2016-09-152-3/+30
| | | | | | | | | | enumeration type to va_start(). The underlying type for an enumeration in C is either char, signed int, or unsigned int. In the case the underlying type is chosen to be char (such as when passing -fshort-enums or using __attribute__((packed)) on the enum declaration), the enumeration can result in undefined behavior. However, when the underlying type is signed int or unsigned int (or long long as an extension), there is no undefined behavior because the types are compatible. This patch silences diagnostics for the latter while retaining the diagnostics for the former. This patch addresses PR29140. llvm-svn: 281632
* [InstCombine] allow icmp (sub nsw) folds for vectorsSanjay Patel2016-09-152-48/+39
| | | | | | Also, clean up the code and comments for the existing folds in foldICmpSubConstant(). llvm-svn: 281631
* [InstCombine] add vector tests for icmp (sub nsw)Sanjay Patel2016-09-151-0/+44
| | | | llvm-svn: 281630
* [IRObjectFile] Handle undefined weak symbols in RecordStreamer.Davide Italiano2016-09-155-7/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D24594 llvm-svn: 281629
OpenPOWER on IntegriCloud