summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [LLVMConfig.cmake] LLVM_CONFIG_EXPORTED_TARGETS => LLVM_EXPORTED_TARGETS.Michael Gottesman2016-06-291-1/+1
| | | | | | | This matches more closely the rest of the variables in LLVMConfig.cmake which shed the _CONFIG_ part of their names. llvm-svn: 274175
* [compiler-rt] Fix Sanitizer-common Unittests on win64Etienne Bergeron2016-06-292-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is fixing unittests that are broken on windows (64-bits). Tests under 'SANITIZER_CAN_USE_ALLOCATOR64' are disabled. A custom allocator for windows based on WinHeap API will replace these tests. Tested on Win32/Win64 (Ninja and MSVC). Tested on Linux 32-bit/64-bit clang. ``` C:\src\llvm\build64\projects\compiler-rt>lib\sanitizer_common\tests\Release\Sanitizer-x86_64-Test.exe [==========] Running 101 tests from 12 test cases. [----------] Global test environment set-up. [----------] 51 tests from SanitizerCommon [ RUN ] SanitizerCommon.DefaultSizeClassMap [ OK ] SanitizerCommon.DefaultSizeClassMap (1 ms) [ RUN ] SanitizerCommon.CompactSizeClassMap [ OK ] SanitizerCommon.CompactSizeClassMap (1 ms) [ RUN ] SanitizerCommon.InternalSizeClassMap [ OK ] SanitizerCommon.InternalSizeClassMap (1 ms) [ RUN ] SanitizerCommon.SizeClassAllocator32Compact [ OK ] SanitizerCommon.SizeClassAllocator32Compact (828 ms) [ RUN ] SanitizerCommon.SizeClassAllocator32CompactMetadataStress [ OK ] SanitizerCommon.SizeClassAllocator32CompactMetadataStress (914 ms) [ RUN ] SanitizerCommon.SizeClassAllocator32MapUnmapCallback [...] [----------] 4 tests from Symbolizer [ RUN ] Symbolizer.ExtractToken [ OK ] Symbolizer.ExtractToken (0 ms) [ RUN ] Symbolizer.ExtractInt [ OK ] Symbolizer.ExtractInt (0 ms) [ RUN ] Symbolizer.ExtractUptr [ OK ] Symbolizer.ExtractUptr (0 ms) [ RUN ] Symbolizer.ExtractTokenUpToDelimiter [ OK ] Symbolizer.ExtractTokenUpToDelimiter (0 ms) [----------] 4 tests from Symbolizer (24 ms total) [----------] Global test environment tear-down [==========] 101 tests from 12 test cases ran. (5090 ms total) [ PASSED ] 101 tests. ``` Reviewers: rnk Subscribers: chrisha, wang0109, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D21817 llvm-svn: 274174
* [llvm-cov] Use relative paths to file reports in -output-dir modeVedant Kumar2016-06-293-5/+17
| | | | | | This makes it possible to e.g copy a report to another filesystem. llvm-svn: 274173
* [compiler-rt] Fix the Asan unittest on WindowsEtienne Bergeron2016-06-291-1/+1
| | | | | | | | | | | | | | | | | Summary: The build bot is broken because the runtime library doesn't have debug information. This is broken due to a recent change: http://reviews.llvm.org/D21554 Reviewers: rnk Subscribers: kubabrecka, llvm-commits, chrisha Differential Revision: http://reviews.llvm.org/D21862 llvm-svn: 274172
* Resubmit "Update llvm command line parser to support subcommands."Zachary Turner2016-06-294-108/+680
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue where occurrence counts would be unexpectedly reset when parsing different parts of a command line multiple times. **ORIGINAL COMMIT MESSAGE** This allows command line tools to use syntaxes like the following: llvm-foo.exe command1 -o1 -o2 llvm-foo.exe command2 -p1 -p2 Where command1 and command2 contain completely different sets of valid options. This is backwards compatible with previous uses of llvm cl which did not support subcommands, as any option which specifies no optional subcommand (e.g. all existing code) goes into a special "top level" subcommand that expects dashed options to appear immediately after the program name. For example, code which is subcommand unaware would generate a command line such as the following, where no subcommand is specified: llvm-foo.exe -q1 -q2 The top level subcommand can co-exist with actual subcommands, as it is implemented as an actual subcommand which is searched if no explicit subcommand is specified. So llvm-foo.exe as specified above could be written so as to support all three aforementioned command lines simultaneously. There is one additional "special" subcommand called AllSubCommands, which can be used to inject an option into every subcommand. This is useful to support things like help, so that commands such as: llvm-foo.exe --help llvm-foo.exe command1 --help llvm-foo.exe command2 --help All work and display the help for the selected subcommand without having to explicitly go and write code to handle each one separately. This patch is submitted without an example of anything actually using subcommands, but a followup patch will convert the llvm-pdbdump tool to use subcommands. Reviewed By: beanz llvm-svn: 274171
* P0305R1: Parsing support for init-statements in 'if' and 'switch' statements.Richard Smith2016-06-2913-61/+254
| | | | | | | | | | | | | | | | | | No semantic analysis yet. This is a pain to disambiguate correctly, because the parsing rules for the declaration form of a condition and of an init-statement are quite different -- for a token sequence that looks like a declaration, we frequently need to disambiguate all the way to the ')' or ';'. We could do better here in some cases by stopping disambiguation once we've decided whether we've got an expression or not (rather than keeping going until we know whether it's an init-statement declaration or a condition declaration), by unifying our parsing code for the two types of declaration and moving the syntactic checks into Sema; if this has a measurable impact on parsing performance, I'll look into that. llvm-svn: 274169
* [ClangConfig] Copy ClangConfig.cmake to ↵Michael Gottesman2016-06-291-1/+1
| | | | | | | | | | | | | | ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR} instead of to ${CLANG_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}. This is an obvious bug since ClangConfig.cmake looks for ClangTargets.cmake in ${CMAKE_CURRENT_LIST_DIR}. But ClangTargets.cmake is in ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}, so it will always fail with an in tree build. In the case where clang is built out of tree, this is still correct since CMAKE_BINARY_DIR and CLANG_BINARY_DIR will be the same. llvm-svn: 274168
* Convert another case over to RevertingTentativeParsingAction.Richard Smith2016-06-291-4/+1
| | | | llvm-svn: 274167
* Switch to an RAII object to revert tentative parsing automatically.Richard Smith2016-06-292-27/+23
| | | | llvm-svn: 274165
* Add NSTaggedPointerString to the table of data formattersEnrico Granata2016-06-291-0/+1
| | | | | | Fixes rdar://27002512 llvm-svn: 274164
* Revert r273313 "[NVPTX] Improve lowering of byval args of device functions."Artem Belevich2016-06-295-105/+23
| | | | | | The change causes llvm crash in some unoptimized builds. llvm-svn: 274163
* StackColoring for SafeStack.Evgeniy Stepanov2016-06-298-38/+1222
| | | | | | | | | | | | | | | | This is a fix for PR27842. An IR-level implementation of stack coloring tailored to work with SafeStack. It is a bit weaker than the MI implementation in that it does not the "lifetime start at first access" logic. This can be improved in the future. This patch also replaces the naive implementation of stack frame layout with a greedy algorithm that can split existing stack slots and even fit small objects inside the alignment padding of other objects. llvm-svn: 274162
* Matching change for lld for the llvm change of Archive::create() from ↵Kevin Enderby2016-06-294-7/+16
| | | | | | ErrorOr<...> to Expected<...> in r274160. llvm-svn: 274161
* Change Archive::create() from ErrorOr<...> to Expected<...> and updateKevin Enderby2016-06-297-29/+43
| | | | | | | | | its clients. This commit will break the next lld builds. I’ll be committing the matching change for lld next. llvm-svn: 274160
* Validate the option index before trying to access an array element using it ↵Enrico Granata2016-06-291-0/+7
| | | | | | - OptionArgElement can potentially use negative indices to mean interesting, but non option, states llvm-svn: 274159
* [ClangConfig] Replace paths with the same value as CLANG_INSTALL_PACKAGE_DIR ↵Michael Gottesman2016-06-291-2/+2
| | | | | | with a deref of the variable. llvm-svn: 274158
* [cmake] Move creation of ClangTargets and installation of ClangConfig.cmake ↵Michael Gottesman2016-06-292-22/+23
| | | | | | | | from ./CMakeLists.txt -> ./cmake/modules/CMakeLists.txt. This matches LLVM. llvm-svn: 274157
* [InstCombine] Simplify and correct folding fcmps with the same childrenTim Shen2016-06-294-598/+283
| | | | | | | | | | | | | | Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants. Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that. Reviewers: spatel Subscribers: llvm-commits, iteratee, echristo Differential Revision: http://reviews.llvm.org/D21775 llvm-svn: 274156
* [InstCombine, NFC] Change the generated variable names by creating new ↵Tim Shen2016-06-292-30/+30
| | | | | | | | instructions This removes some noise for D21775's test changes. llvm-svn: 274155
* [Triple] Reimplement isLittleEndian(). Now it works for arm too.Davide Italiano2016-06-292-30/+33
| | | | | | Differential Revision: http://reviews.llvm.org/D21846 llvm-svn: 274154
* [compiler-rt] Fix passing debug information to unittest.Etienne Bergeron2016-06-292-0/+8
| | | | | | | | | | | | | | | | | | | | Summary: On windows, the debug information was not present in the unittest executables, which make them hard to debug. The Sanitizer Unittests are compiled with a local clang build. The link pass is also done by calling clang. This pass is adding the appropriate flags to bring the right debug information to these executables. Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: http://reviews.llvm.org/D21838 llvm-svn: 274153
* Permit memory operands in ins/outs instructionsNirav Dave2016-06-293-4/+76
| | | | | | | | | | | | | | | [x86] (PR15455) While (ins|outs)[bwld] instructions do not take %dx as a memory operand, various unofficial references do and objdump disassembles to this format. Extend special treatment of similar (in|out)[bwld] operations. Reviewers: craig.topper, rnk, ab Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18837 llvm-svn: 274152
* Fix omp_sections_nowait.c test to address Bugzilla Bug 28336Jonathan Peyton2016-06-291-24/+59
| | | | | | | | | | | | | This rewrite of the omp_sections_nowait.c test file causes it to hang if the nowait is not respected. If the nowait isn't respected, the lone thread which can escape the first sections construct will just sleep at a barrier which shouldn't exist. All reliance on timers is taken out. For good measure, the test makes sure that all eight sections are executed as well. The test should take no longer than a few seconds on any modern machine. Differential Revision: http://reviews.llvm.org/D21842 llvm-svn: 274151
* [OpenCL] Allow -cl-std and other standard -cl- options in driverYaxun Liu2016-06-296-39/+109
| | | | | | | | | | | | Allow -cl-std and other standard -cl- options from cc1 to driver. Added a test for the options moved. Patch by Aaron En Ye Shi. Differential Revision: http://reviews.llvm.org/D21031 llvm-svn: 274150
* Add CapturedDecl::parameters() ArrayRef accessors following r273647.Yaron Keren2016-06-291-0/+8
| | | | llvm-svn: 274149
* Don't verify inputs to the Linker if ODR merging.Rafael Espindola2016-06-294-2/+31
| | | | | | | | | | | | | | | | | | This fixes pr28072. The point, as Duncan pointed out, is that the file is already partially linked by just reading it. Long term I think the solution is to make metadata owned by the module and then the linker will lazily read it and be in charge of all the linking. Running a verifier in each input will defeat the lazy loading, but will be legal. Right now we are at the unfortunate position that to support odr merging we cannot verify the inputs, which mildly annoying (see test update). llvm-svn: 274148
* Re-land "[MS] Don't expect vftables to be provided for extern template ↵Reid Kleckner2016-06-296-27/+55
| | | | | | | | | | | | | | instantiations" Reverts r273305 and re-instates r273296. We needed to fix a bug in Sema::MarkVTableUsed to ensure that operator delete lookup occurs when the vtable is referenced. We already had a special case to look up operator delete when dllimport was used, but I think should really mark virtual destructors referenced any time the vtable is used. llvm-svn: 274147
* [InstCombine] Add full tests for FoldAndOfFCmps and FoldOrOfFCmpsTim Shen2016-06-292-104/+3156
| | | | | | | | | | | | Summary: This adds tests for covering all cases that FoldAndOfFCmps and FoldOrOfFCmps handle. Reviewers: spatel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21844 llvm-svn: 274144
* [llvm-cov] Change some FileCheck prefixes to make tests reusable (NFC)Vedant Kumar2016-06-292-34/+34
| | | | | | | | I'm planning on extending these two tests with checks that validate html coverage reports. Make it easier to extend them by not using a prefix called "CHECK". llvm-svn: 274143
* Add a regression test for PR28348.Nico Weber2016-06-291-0/+20
| | | | llvm-svn: 274142
* Revert r272251, it caused PR28348.Nico Weber2016-06-292-55/+1
| | | | llvm-svn: 274141
* [LLVMConfig.cmake.in] Create a new variable LLVM_CONFIG_EXPORTED_TARGETS ↵Michael Gottesman2016-06-291-0/+1
| | | | | | that contains the list of all targets exported via LLVMExports.cmake. llvm-svn: 274140
* Use LLVM_ATTRIBUTE_UNUSED instead of void casts; NFCVedant Kumar2016-06-291-7/+7
| | | | llvm-svn: 274139
* [X86] Lower blended PACKUSes using appropriate types.Ahmed Bougacha2016-06-292-11/+73
| | | | | | | | | | | | | When lowering two blended PACKUS, we used to disregard the types of the PACKUS inputs, indiscriminately generating a v16i8 PACKUS. This leads to non-selectable things like: (v16i8 (PACKUS (v4i32 v0), (v4i32 v1))) Instead, check that the PACKUSes have the same type, and use that as the final result type. llvm-svn: 274138
* [llvm-cov] Disable PGO name compression in a test fileVedant Kumar2016-06-291-0/+0
| | | | | | | | Some bots do not configure llvm with zlib enabled. Should fix: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/15571 llvm-svn: 274137
* Fix a typo; NFCVedant Kumar2016-06-291-1/+1
| | | | llvm-svn: 274136
* [llvm-cov] Do not allow ".." to escape the coverage sub-directoryVedant Kumar2016-06-294-2/+22
| | | | | | | | | | | In -output-dir mode, file reports are placed into a "coverage" directory. If filenames in the coverage mapping contain "..", they might escape out of this directory. Fix the problem by removing ".." from source filenames (expand the path component). llvm-svn: 274135
* [ELF] More self-explanatory error message when e_machine can't be inferred.Davide Italiano2016-06-291-1/+1
| | | | | | Thanks to Sean Silva for the suggestion! llvm-svn: 274134
* AvailabilityAttr: update the document for macosxManman Ren2016-06-291-0/+2
| | | | llvm-svn: 274133
* [libcxx] Fix a bug in strstreambuf::overflow.Akira Hatanaka2016-06-292-2/+33
| | | | | | | | | | | The end pointer should point to one past the end of the newly allocated buffer. rdar://problem/24265174 Differential Revision: http://reviews.llvm.org/D20334 llvm-svn: 274132
* [ManagedStatic] Reimplement double-checked locking with std::atomic.Benjamin Kramer2016-06-292-40/+17
| | | | | | | | | | | | | This gets rid of the memory fence in the hot path (dereferencing the ManagedStatic), trading for an extra mutex lock in the cold path (when the ManagedStatic was uninitialized). Since this only happens on the first accesses it shouldn't matter much. On strict architectures like x86 this removes any atomic instructions from the hot path. Also remove the tsan annotations, tsan knows how standard atomics work so they should be unnecessary now. llvm-svn: 274131
* Drop support for creating $stubs.Rafael Espindola2016-06-2911-298/+18
| | | | | | They are created by ld64 since OS X 10.5. llvm-svn: 274130
* Update tests to use at least darwin9.Rafael Espindola2016-06-2912-163/+71
| | | | llvm-svn: 274129
* [Docs][CodeGenerator] Don't specify the number of operands in BuildMIKrzysztof Parzyszek2016-06-292-17/+14
| | | | | | | | Patch by Visoiu Mistrih Francis. Differential Revision: http://reviews.llvm.org/D21819 llvm-svn: 274128
* [X86][SSE2] Added _mm_loadu_si64 test to match ↵Simon Pilgrim2016-06-291-0/+11
| | | | | | llvm\tools\clang\test\CodeGen\sse2-builtins.c llvm-svn: 274127
* [X86][SSE2] Updated tests to match ↵Simon Pilgrim2016-06-291-9/+8
| | | | | | llvm\test\CodeGen\X86\sse2-intrinsics-fast-isel-x86_64.ll llvm-svn: 274126
* Remove platform plugins from lldb-serverPavel Labath2016-06-297-120/+47
| | | | | | | | | | | | | | | | | | | Summary: This removes the last usage of Platform plugins in lldb-server -- it was used for launching child processes, where it can be trivially replaced by Host::LaunchProces (as lldb-server is always running on the host). Removing platform plugins enables us to remove a lot of other unused code, which was pulled in as a transitive dependency, and it reduces lldb-server size by 4%--9% (depending on build type and architecture). Reviewers: clayborg Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D20440 llvm-svn: 274125
* [X86] Regenerated popcnt combine testsSimon Pilgrim2016-06-291-14/+24
| | | | llvm-svn: 274124
* [ELF] - Added support for --unresolved-symbols option.George Rimar2016-06-296-12/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Option has next description (http://linux.die.net/man/1/ld): "--unresolved-symbols=method Determine how to handle unresolved symbols. There are four possible values for method according to documentation: ignore-all: Do not report any unresolved symbols. report-all: Report all unresolved symbols. This is the default. ignore-in-object-files: Report unresolved symbols that are contained in shared libraries, but ignore them if they come from regular object files. ignore-in-shared-libs: Report unresolved symbols that come from regular object files, but ignore them if they come from shared libraries." Since report-all is default and we traditionally do not report about undefined symbols in lld, report-all does not report about undefines from DSO. ignore-in-object-files also does not do that. Handling of that option differs from what gnu linkers do. Option works in next way in lld: ignore-all: Do not report any unresolved symbols. report-all: Report all unresolved symbols except symbols from DSOs. This is the default. ignore-in-object-files: The same as ignore-all. gnore-in-shared-libs: The same as report-all. This is PR24524. Differential revision: http://reviews.llvm.org/D21794 llvm-svn: 274123
* [OpenCL] Add attribute 'pure' to read_image built-in functions to enable ↵Alexey Bader2016-06-291-215/+215
| | | | | | | | | | | | optimizations. Reviewers: Anastasia, yaxunl Subscribers: pekka.jaaskelainen, pxli168, cfe-commits Differential Revision: http://reviews.llvm.org/D21795 llvm-svn: 274122
OpenPOWER on IntegriCloud