summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Hexagon] Expand VSelect pseudo instructionsKrzysztof Parzyszek2016-05-122-0/+71
| | | | llvm-svn: 269328
* [VFS] Reapply #2: Reconstruct the VFS overlay tree for more accurate lookupBruno Cardoso Lopes2016-05-122-1/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reapply r269100 and r269270, reverted due to https://llvm.org/bugs/show_bug.cgi?id=27725. Isolate the testcase that corresponds to the new feature side of this commit and skip it on windows hosts until we find why it does not work on these platforms. Original commit message: The way we currently build the internal VFS overlay representation leads to inefficient path search and might yield wrong answers when asked for recursive or regular directory iteration. Currently, when reading an YAML file, each YAML root entry is placed inside a new root in the filesystem overlay. In the crash reproducer, a simple "@import Foundation" currently maps to 43 roots, and when looking up paths, we traverse a directory tree for each of these different roots, until we find a match (or don't). This has two consequences: - It's slow. - Directory iteration gives incomplete results since it only return results within one root - since contents of the same directory can be declared inside different roots, the result isn't accurate. This is in part fault of the way we currently write out the YAML file when emitting the crash reproducer - we could generate only one root and that would make it fast and correct again. However, we should not rely on how the client writes the YAML, but provide a good internal representation regardless. Build a proper virtual directory tree out of the YAML representation, allowing faster search and proper iteration. Besides the crash reproducer, this potentially benefits other VFS clients. llvm-svn: 269327
* [Unittests] Reverse the order of arguments for correct debug outputBruno Cardoso Lopes2016-05-121-1/+1
| | | | llvm-svn: 269326
* [unittests] Use coveragemap_error in CoverageMappingReaderMock (NFC)Vedant Kumar2016-05-121-2/+2
| | | | llvm-svn: 269324
* Cleanup rejection log handling [NFC]Johannes Doerfert2016-05-126-144/+75
| | | | | | | | | | | | This patch cleans up the rejection log handling during the ScopDetection. It consists of two interconnected parts: - We keep all detection contexts for a function in order to provide more information to the user, e.g., about the rejection of extended/intermediate regions. - We remove the mutable "RejectLogs" member as the information is available through the detection contexts. llvm-svn: 269323
* [PM] Make LowerAtomic a FunctionPass.Davide Italiano2016-05-121-5/+16
| | | | | | Differential Revision: http://reviews.llvm.org/D20025 llvm-svn: 269322
* [LoopVectorizer] LoopVectorBody doesn't need to be a vector. NFC.Michael Kuperstein2016-05-121-40/+22
| | | | | | | | | | | LoopVectorBody was changed from a single pointer to a SmallVector when store predication was introduced in r200270. Since r247139, store predication no longer splits the vector loop body in-place, so we can go back to having a single LoopVectorBody block. This reverts the no-longer-needed changes from r200270. llvm-svn: 269321
* [yaml2macho] Handle mach_header_64 reserved fieldChris Bieneman2016-05-124-2/+12
| | | | | | I've added the reserved field as an "optional" in YAML, but I've added asserts in the yaml2macho code to enforce that the field is present in mach_header_64, but not in mach_header. llvm-svn: 269320
* [yaml2macho] Use memset instead of bzeroChris Bieneman2016-05-121-1/+2
| | | | | | This should fix the bots I broke. llvm-svn: 269319
* [ObjectYAML] filetype is a required field in MachO headersChris Bieneman2016-05-121-1/+1
| | | | | | Not sure how I managed to copy-pasta this wrong, but I did. llvm-svn: 269317
* Get rid of CVLeafTypes.def and combine with TypeRecords.defZachary Turner2016-05-126-325/+264
| | | | | | | | | | This merges the functionality of the macros in `CVLeafTypes.def` and the macros in `TypeRecords.def` into a single set of macros. Differential Revision: http://reviews.llvm.org/D20190 Reviewed By: rnk, amccarth llvm-svn: 269316
* Make CodeView record serialization more generic.Zachary Turner2016-05-126-330/+426
| | | | | | | | | | | This introduces a variadic template and some helper macros to safely and correctly deserialize many types of common record fields while maintaining error checking. Differential Revision: http://reviews.llvm.org/D20183 Reviewed By: rnk, amccarth llvm-svn: 269315
* [yaml2obj] Support for dumping mach_header from yamlChris Bieneman2016-05-124-3/+114
| | | | | | | | With this change obj2yaml and yaml2obj can now round-trip mach_headers. This change also adds ObjectYAML/MachO tests. llvm-svn: 269314
* [obj2yaml] Include all mach_header fields in yamlChris Bieneman2016-05-123-1/+8
| | | | | | Since we want to be able to use yaml to describe degenerate object files as well as valid ones, we need to be explicit of some fields in your yaml definitions. llvm-svn: 269313
* [Hexagon] Properly handle instruction selection of vsplat intrinsicsKrzysztof Parzyszek2016-05-122-2/+13
| | | | llvm-svn: 269312
* Update test expectations after r269291 (Fix a crash when demangling Swift ↵Kuba Brecka2016-05-123-3/+3
| | | | | | symbols). llvm-svn: 269311
* More fixup for r269288 and r269296. Adding the missing 'return'.Kuba Brecka2016-05-121-1/+1
| | | | llvm-svn: 269310
* [ubsan] Add -fsanitize-undefined-strip-path-components=NFilipe Cabecinhas2016-05-128-1/+94
| | | | | | | | | | | | | | | | | | | Summary: This option allows the user to control how much of the file name is emitted by UBSan. Tuning this option allows one to save space in the resulting binary, which is helpful for restricted execution environments. With a positive N, UBSan skips the first N path components. With a negative N, UBSan only keeps the last N path components. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19666 llvm-svn: 269309
* minor test clean up /NFCXinliang David Li2016-05-121-5/+4
| | | | llvm-svn: 269308
* Fix option description /NFCXinliang David Li2016-05-121-2/+2
| | | | llvm-svn: 269307
* [OpenCL] Output OpenCL version in diagnostics.Anastasia Stulova2016-05-126-17/+22
| | | | | | | | | | | | | | Diagnostics should note version dependent issues by giving a hint about current version being compiled for. This patch changes diagnostics of static storage class specifier and generic type qualifier to specify OpenCL version as well as converts other diagnostics to match the style. Patch by Vedran Miletic! Review: http://reviews.llvm.org/D19780 llvm-svn: 269305
* [macho2yaml] Add support for dumping mach_headersChris Bieneman2016-05-121-1/+29
| | | | | | | | | | | | | | | This patch adds the ability to dump mach headers. For my local clang binary the macho2yaml output is now: --- !mach-o FileHeader: cputype: 0x01000007 cpusubtype: 0x80000003 filetype: 0x00000002 ncmds: 19 flags: 0x00A18085 ... llvm-svn: 269304
* [ObjectYAML] Support Thin MachO headers to YAMLChris Bieneman2016-05-123-0/+98
| | | | | | This patch adds support to ObjectYAML for serializing mach_header structs. llvm-svn: 269303
* [sanitizer] Allow nullptr in Swift demanglerKuba Brecka2016-05-121-1/+3
| | | | | | | | The introduction of the Swift demangler now causes an assertion failure when we try to demangle nullptr, but we used to allow that (and return nullptr back). This situation is rare, but it can still happen. Let's allow nullptr. llvm-svn: 269302
* Bring some comments up to date [NFC]Johannes Doerfert2016-05-121-8/+2
| | | | llvm-svn: 269301
* Support truncate operationsJohannes Doerfert2016-05-1210-29/+239
| | | | | | | | | Truncate operations are basically modulo operations, thus we can model them that way. However, for large types we assume the operand to fit in the new type size instead of introducing a modulo with a very large constant. llvm-svn: 269300
* Check overflows in RTCs and bail accordinglyJohannes Doerfert2016-05-1211-62/+393
| | | | | | | | | | | | | | | We utilize assumptions on the input to model IR in polyhedral world. To verify these assumptions we version the code and guard it with a runtime-check (RTC). However, since the RTCs are themselves generated from the polyhedral representation we generate them under the same assumptions that they should verify. In other words, the guarantees that we try to provide with the RTCs do not hold for the RTCs themselves. To this end it is necessary to employ a different check for the RTCs that will verify the assumptions did hold for them too. Differential Revision: http://reviews.llvm.org/D20165 llvm-svn: 269299
* Apply D20014 - fix a missing return in a test. Fixes PR#27720Marshall Clow2016-05-121-1/+1
| | | | llvm-svn: 269298
* [mips][sanitizer_common] Don't use `ld` in internal_clone() on 32-bit MIPS.Daniel Sanders2016-05-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | Summary: On a 32-bit MIPS, the `ld` instruction does not exist. However, GAS has an `ld` macro that expands to a pair of `lw` instructions which load to a pair of registers (reg, and reg+1). This macro is not available in the Integrated Assembler and its use causes -fintegrated-as builds to fail. Even if it were available, the behaviour on 32-bit MIPS would be incorrect since the current usage of `ld` causes the code to clobber $5 (which is supposed to hold child_stack). It also clobbers $k0 which is reserved for kernel use. Aside from enabling builds with the integrated assembler, there is no functional change since internal_clone() is only used by StopTheWorld() which is only used by 64-bit sanitizers. Reviewers: kcc, sagar Subscribers: mohit.bhakkad, jaydeep, sagar, llvm-commits Differential Revision: http://reviews.llvm.org/D18753 llvm-svn: 269297
* Fixup for r269288. SleepForSeconds is not available in nolibc builds, let's ↵Kuba Brecka2016-05-124-0/+15
| | | | | | add an internal_sleep. llvm-svn: 269296
* [mips][ias] Fix O32 .cprestore directive when inside .set noat region and ↵Daniel Sanders2016-05-124-20/+54
| | | | | | | | | | | | | | | | | | offset is in range. Summary: This expands on r269179 to fix an additional case that was not covered by our tests. The assembler temporary is not needed when the .cprestore offset fits inside a simm16 and it is not an error to use it inside a '.set noat' in this case. Reviewers: emaste, seanbruno, sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D20199 llvm-svn: 269295
* [mips][ias] Work around incorrect another microMIPS relocation evaluation ↵Daniel Sanders2016-05-122-1/+10
| | | | | | | | | | | | | | | | | | | | exposed by r268900 As explained in r269196, microMIPS has a special case that is not correctly implemented in LLVM. If we have a symbol 'foo' which is equivalent to '.text+0x10'. The value of an R_MICROMIPS_LO16 relocation using 'foo' is 'foo+0x11' and not 'foo+0x10'. The in-place addend should therefore be 0x11. This commit reverts a little more of the effect of r268900 by keeping the symbol when the STO_MIPS_MICROMIPS flag is set for R_MIPS_GPREL32 relocations. This fixes SingleSource/UnitTests/2003-08-11-VaListArg, and SingleSource/UnitTests/2003-05-07-VarArgs for microMIPS. I believe there are additional relocations that have the same issue (e.g. R_MIPS_64, and R_MIPS_GPREL16) but for now I'm focusing on restoring our internal buildbots back to the green state we had in r268899. llvm-svn: 269294
* Fixup for r269291, which broke the Go TSan build. Let's not use the ↵Kuba Brecka2016-05-121-0/+2
| | | | | | symbolizer in Go builds. llvm-svn: 269293
* [AArch64] Remove command-line option use for testing.Chad Rosier2016-05-122-9/+1
| | | | | | | The EXTR combine has been in tree for over 2 years without complain, so go ahead and remove the option. llvm-svn: 269292
* [sanitizer] Fix a crash when demangling Swift symbols, take 2Kuba Brecka2016-05-125-14/+32
| | | | | | | | | | To invoke the Swift demangler, we use dlsym to locate swift_demangle. However, dlsym malloc's storage and stores it in thread-local storage. Since allocations from the symbolizer are done with the system allocator (at least in TSan, interceptors are skipped when inside the symbolizer), we will crash when we try to deallocate later using the sanitizer allocator again. To fix this, let's just not call dlsym from the demangler, and call it during initialization. The dlsym function calls malloc, so it needs to be only used after our allocator is initialized. Adding a Symbolizer::LateInitialize call that is only invoked after all other initializations. Differential Revision: http://reviews.llvm.org/D20015 llvm-svn: 269291
* [SelectionDAG] Attempt to split BITREVERSE vector legalization into BSWAP ↵Simon Pilgrim2016-05-123-2776/+1174
| | | | | | | | | | | | | | and BITREVERSE stages For BITREVERSE, bit shifting/masking every bit in a vector element is a very lengthy procedure. If the input vector type is a whole multiple of bytes wide then we can split this into a BSWAP shuffle stage (to reverse at the byte level) and then a BITREVERSE stage applied to each byte. Most vector capable targets can efficiently BSWAP using shuffles resulting in a considerable reduction in instructions. With this patch targets would only need to implement a target specific vXi8 BITREVERSE implementation to efficiently reverse most legal vector types. Differential Revision: http://reviews.llvm.org/D19978 llvm-svn: 269290
* [sanitizer] On OS X, exit the forked process gracefully when login_tty failsKuba Brecka2016-05-121-1/+5
| | | | | | | | We're using forkpty to spawn the atos symbolizer. In some cases, login_tty (part of forkpty) can fail due to security measures (sandboxing). In this case, we should exit with a status code instead of completely crashing the spawned process. Even processing a failed CHECK() is problematic here, because we're post-fork and pre-exec where a lot of things don't work (for multithreaded processes, for OS X GUI apps, etc.). Differential Revision: http://reviews.llvm.org/D20048 llvm-svn: 269289
* [sanitizer] Break infinite recursion in case of recursive failed CHECKsKuba Brecka2016-05-121-0/+8
| | | | | | | | While debugging ASan and TSan, I sometimes get a recursion during a failed CHECK processing. CheckFailed can call a lot of code (printing, unwinding a stack trace, symbolicating, ...) and this can fail another CHECK. This means I sometimes see a crash due to a infinite recursion stack overflow. Let's stop after 10 failed CHECKs and just kill the process immediately. I also added a Sleep(2) call before the trap, so that other threads still get a chance to print their failed CHECKs. Differential Revision: http://reviews.llvm.org/D20047 llvm-svn: 269288
* Revert "[mips][microMIPS] Implement CFC*, CTC* and LDC* instructions"Hrvoje Varga2016-05-1217-220/+15
| | | | | | This reverts commit r269176 as it caused test-suite failure. llvm-svn: 269287
* Refactor duplicated code. NFC.Rafael Espindola2016-05-122-33/+39
| | | | | | Linkage is always followed by visibility and dll storage. llvm-svn: 269286
* [scan-build] fix warnings emitted on LLVM ARM code baseRenato Golin2016-05-122-2/+4
| | | | | | | | | Fix "Logic error" warnings of the type "Called C++ object pointer is null" reported by Clang Static Analyzer. Patch by Apelete Seketeli. llvm-svn: 269285
* New hwloc API compatibilityPaul Osmialowski2016-05-121-0/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D19628 llvm-svn: 269284
* [mips][ias] Correct ELF eflags when Octeon is the target.Daniel Sanders2016-05-125-27/+59
| | | | | | | | | | Reviewers: sdardis Subscribers: petarj, mpf, dsanders, spetrovic, llvm-commits, sdardis Differential Revision: http://reviews.llvm.org/D18899 llvm-svn: 269283
* clang-format: [JS] respect clang-format off when requoting strings.Martin Probst2016-05-122-1/+9
| | | | | | | | | | Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D20200 llvm-svn: 269282
* Fix a race in ProcessGDBRemote::MonitorDebugServerProcessPavel Labath2016-05-122-69/+42
| | | | | | | | | | | | | | | | | | | | | | Summary: MonitorDebugServerProcess went to a lot of effort to make sure its asynchronous invocation does not cause any mischief, but it was still not race-free. Specifically, in a quick stop-restart sequence (like the one in TestAddressBreakpoints) the copying of the process shared pointer via target_sp->GetProcessSP() was racing with the resetting of the pointer in DeleteCurrentProcess, as they were both accessing the same shared_ptr object. To avoid this, I simply pass in a weak_ptr to the process when the callback is created. Locking this pointer is race-free as they are two separate object even though they point to the same process instance. This also removes the need for the complicated tap-dance around retrieving the process pointer. Reviewers: clayborg Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D20107 llvm-svn: 269281
* [mips][ias] Handle N64 compound relocations and R_MIPS_SUB in ↵Daniel Sanders2016-05-123-15/+51
| | | | | | | | | | | | | | | | | | | needsRelocateWithSymbol() Summary: This eliminates the default case for N64 that was left out of r269047. The change to R_MIPS_SUB is needed in this patch to make this testable since %lo(%neg(%gp_rel(foo))) and %hi(%neg(%gp_rel(foo))) remain the only ways to get a compound relocation from the assembler. Reviewers: sdardis, rafael Subscribers: dsanders, llvm-commits, sdardis Differential Revision: http://reviews.llvm.org/D20097 llvm-svn: 269280
* [Driver] Squash misleading indentation warning.Marcin Koscielnicki2016-05-121-6/+6
| | | | llvm-svn: 269279
* [clang-tidy] Ignore using-declarations defined in marcro in ↵Haojian Wu2016-05-122-0/+12
| | | | | | | | | | | | misc-unused-using-decls checks. Reviewers: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20197 llvm-svn: 269278
* [ASan] [SystemZ] Add -mbackchain to test cflags.Marcin Koscielnicki2016-05-121-0/+2
| | | | | | | | | This is needed for proper operation of the fast unwinder, see the discussion on D18895. Differential Revision: http://reviews.llvm.org/D19898 llvm-svn: 269277
* Revert "[VFS] Reapply r269100: Reconstruct the VFS overlay tree for more ↵Bruno Cardoso Lopes2016-05-122-109/+2
| | | | | | | | | | accurate lookup" Reverts r269270, buildbots still failing: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/12119 http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/2847 llvm-svn: 269276
OpenPOWER on IntegriCloud