summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [test] Relax stderr expectations on targets with chatty outputPavel Labath2016-04-147-12/+31
| | | | | | | | | | | | | | | Summary: On some android targets, a binary can produce additional garbage (e.g. warning messages from the dynamic linker) on the standard error, which confuses some tests. This relaxes the stderr expectations for targets known for their chattyness. Reviewers: tfiala, ovyalov Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D19114 llvm-svn: 266326
* Fix testcase for the LLVM_LIBDIR_SUFFIX=64 case. Fallout from r266108.Ismail Donmez2016-04-141-1/+1
| | | | llvm-svn: 266324
* Add contexts to test cases. NFC.Michael Kruse2016-04-142-2/+12
| | | | | | | | As discussed in the Polly weekly phone call and reviews.llvm.org/D18878, the assumed contexts changed (widen) due to D18878/r265942. Also check these contexts in the tests affected by that change. llvm-svn: 266323
* Add InvalidContext to update_test.py.Michael Kruse2016-04-141-0/+4
| | | | | | | This allows the test update script to add 'Invalid Context:' to test cases. Enable with --check-include=InvalidContext. llvm-svn: 266322
* clang-format: Last line in incomplete block is indented incorrectlyMarianne Mailhot-Sarrasin2016-04-142-3/+5
| | | | | | | | | | Indentation of the last line was reset to the initial indentation of the block when reaching EOF. Patch by Maxime Beaulieu Differential Revision: http://reviews.llvm.org/D19065 llvm-svn: 266321
* clang-format: Implemented tab usage for continuation and indentationMarianne Mailhot-Sarrasin2016-04-144-0/+238
| | | | | | | | | | Use tabs to fill whitespace at the start of a line. Patch by Maxime Beaulieu Differential Revision: http://reviews.llvm.org/D19028 llvm-svn: 266320
* clang-format: Allow include of clangFormat.h in managed contextMarianne Mailhot-Sarrasin2016-04-142-1/+5
| | | | | | | | | | | Including VirtualFileSystem.h in the clangFormat.h indirectly includes <atomic>. This header is blocked when compiling with /clr. Patch by Maxime Beaulieu Differential Revision: http://reviews.llvm.org/D19064 llvm-svn: 266319
* Add missing typename.Rafael Espindola2016-04-141-1/+1
| | | | llvm-svn: 266318
* [ELF] - Refactoring of end/edata/etext implementation.George Rimar2016-04-142-37/+30
| | | | | | | | Minor refactoring of how end/edata/etext symbols are handled. Differential revision: http://reviews.llvm.org/D19109 llvm-svn: 266317
* Find .plt section in object files generated by recent ldUlrich Weigand2016-04-141-5/+5
| | | | | | | | | | | | | | | | | | | | Code in ObjectFileELF::ParseTrampolineSymbols assumes that the sh_info field of the .rel(a).plt section identifies the .plt section. However, with recent GNU ld this is no longer true. As a result of this: https://sourceware.org/bugzilla/show_bug.cgi?id=18169 in object files generated with current linkers the sh_info field of .rel(a).plt now points to the .got.plt section (or .got on some targets). This causes LLDB to fail to identify any PLT stubs, causing a number of test case failures. This patch changes LLDB to simply always look for the .plt section by name. This should be safe across all linkers and targets. Differential Revision: http://reviews.llvm.org/D18973 llvm-svn: 266316
* Fix test cases for big-endian systemsUlrich Weigand2016-04-1410-75/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of test cases were failing on big-endian systems simply due to byte order assumptions in the tests themselves, and no underlying bug in LLDB. These two test cases: tools/lldb-server/lldbgdbserverutils.py python_api/process/TestProcessAPI.py actually check for big-endian target byte order, but contain Python errors in the corresponding code paths. These test cases: functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py functionalities/data-formatter/synthcapping/TestSyntheticCapping.py lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py python_api/sbdata/TestSBData.py (first change) could be fixed to check for big-endian target byte order and update the expected result strings accordingly. For the two synthetic tests, I've also updated the source to make sure the fake_a value is always nonzero on both big- and little-endian platforms. These test case: python_api/sbdata/TestSBData.py (second change) functionalities/memory/cache/TestMemoryCache.py simply accessed memory with the wrong size, which wasn't noticed on LE but fails on BE. Differential Revision: http://reviews.llvm.org/D18985 llvm-svn: 266315
* Fix ARM instruction emulation tests on big-endian systemsUlrich Weigand2016-04-143-62/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running the ARM instruction emulation test on a big-endian system would fail, since the code doesn't respect endianness properly. In EmulateInstructionARM::TestEmulation, code assumes that an instruction opcode read in from the test file is in target byte order, but it was in fact read in in host byte order. More difficult to fix, the EmulationStateARM structure models the overlapping sregs and dregs by a union in _sd_regs. This only works correctly if the host is a little-endian system. I've removed the union in favor of a simple array containing the 32 sregs, and changed any code accessing dregs to explicitly use the correct two sregs overlaying that dreg in the proper target order. Also, the EmulationStateARM::ReadPseudoMemory and WritePseudoMemory track memory as a map of uint32_t values in host byte order, and implement 64-bit memory accessing by splitting them up into two uint32_t ones. However, callers expect memory contents to be provided in the form of a byte array (in target byte order). This means the uint32_t contents need to be byte-swapped on BE systems, and when splitting up a 64-bit access into two 32-bit ones, byte order has to be respected. Differential Revision: http://reviews.llvm.org/D18984 llvm-svn: 266314
* Miscellaneous fixes for big-endian systemsUlrich Weigand2016-04-144-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a bunch of issues that show up on big-endian systems: - The gnu_libstdcpp.py script doesn't follow the way libstdc++ encodes bit vectors: it should identify the enclosing *word* and then access the appropriate bit within that word. Instead, the script simply operates on bytes. This gives the same result on little-endian systems, but not on big-endian. - lldb_private::formatters::WCharSummaryProvider always assumes wchar_t is UTF16, even though it could also be UTF8 or UTF32. This is mostly not an issue on little-endian systems, but immediately fails on BE. Fixed by checking the size of wchar_t like WCharStringSummaryProvider already does. - ClangASTContext::GetChildCompilerTypeAtIndex uses uint32_t to access the virtual base offset stored in the vtable, even though the size of this field matches the target pointer size according to the C++ ABI. Again, this is mostly not visible on LE, but fails on BE. - Process::ReadStringFromMemory uses strncmp to search for a terminator consisting of multiple zero bytes. This doesn't work since strncmp will stop already at the first zero byte. Use memcmp instead. Differential Revision: http://reviews.llvm.org/D18983 llvm-svn: 266313
* Handle bit fields on big-endian systems correctlyUlrich Weigand2016-04-145-10/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the DataExtractor::GetMaxU64Bitfield and GetMaxS64Bitfield routines assume the incoming "bitfield_bit_offset" parameter uses little-endian bit numbering, i.e. a bitfield_bit_offset 0 refers to a bitfield whose least-significant bit coincides with the least- significant bit of the surrounding integer. On many big-endian systems, however, the big-endian bit numbering is used for bit fields. Here, a bitfield_bit_offset 0 refers to a bitfield whose most-significant bit conincides with the most- significant bit of the surrounding integer. Now, in principle LLDB could arbitrarily choose which semantics of bitfield_bit_offset to use. However, there are two problems with the current approach: - When parsing DWARF, LLDB decodes bit offsets in little-endian bit numbering on LE systems, but in big-endian bit numbering on BE systems. Passing those offsets later on into the DataExtractor routines gives incorrect results on BE. - In the interim, LLDB's type layer combines byte and bit offsets into a single number. I.e. instead of recording bitfields by specifying the byte offset and byte size of the surrounding integer *plus* the bit offset of the bit field within that field, it simply records a single bit offset number. Now, note that converting from byte offset + bit offset to a single offset value and back is well-defined if we either use little-endian byte order *and* little-endian bit numbering, or use big-endian byte order *and* big-endian bit numbering. Any other combination will yield incorrect results. Therefore, the simplest approach would seem to be to always use the bit numbering that matches the system byte order. This makes storing a single bit offset valid, and makes the existing DWARF code correct. The only place to fix is to teach DataExtractor to use big-endian bit numbering on big endian systems. However, there is only additional caveat: we also get bit offsets from LLDB synthetic bitfields. While the exact semantics of those doesn't seem to be well-defined, from test cases it appears that the intent was for the user-provided synthetic bitfield offset to always use little-endian bit numbering. Therefore, on a big-endian system we now have to convert those to big-endian bit numbering to remain consistent. Differential Revision: http://reviews.llvm.org/D18982 llvm-svn: 266312
* Fix usage of APInt.getRawData for big-endian systemsUlrich Weigand2016-04-147-310/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Scalar implementation and a few other places in LLDB directly access the internal implementation of APInt values using the getRawData method. Unfortunately, pretty much all of these places do not handle big-endian systems correctly. While on little-endian machines, the pointer returned by getRawData can simply be used as a pointer to the integer value in its natural format, no matter what size, this is not true on big-endian systems: getRawData actually points to an array of type uint64_t, with the first element of the array always containing the least-significant word of the integer. This means that if the bitsize of that integer is smaller than 64, we need to add an offset to the pointer returned by getRawData in order to access the value in its natural type, and if the bitsize is *larger* than 64, we actually have to swap the constituent words before we can access the value in its natural type. This patch fixes every incorrect use of getRawData in the code base. For the most part, this is done by simply removing uses of getRawData in the first place, and using other APInt member functions to operate on the integer data. This can be done in many member functions of Scalar itself, as well as in Symbol/Type.h and in IRInterpreter::Interpret. For the latter, I've had to add a Scalar::MakeUnsigned routine to parallel the existing Scalar::MakeSigned, e.g. in order to implement an unsigned divide. The Scalar::RawUInt, Scalar::RawULong, and Scalar::RawULongLong were already unused and can be simply removed. I've also removed the Scalar::GetRawBits64 function and its few users. The one remaining user of getRawData in Scalar.cpp is GetBytes. I've implemented all the cases described above to correctly implement access to the underlying integer data on big-endian systems. GetData now simply calls GetBytes instead of reimplementing its contents. Finally, two places in the clang interface code were also accessing APInt.getRawData in order to actually construct a byte representation of an integer. I've changed those to make use of a Scalar instead, to avoid having to re-implement the logic there. The patch also adds a couple of unit tests verifying correct operation of the GetBytes routine as well as the conversion routines. Those tests actually exposed more problems in the Scalar code: the SetValueFromData routine didn't work correctly for 128- and 256-bit data types, and the SChar routine should have an explicit "signed char" return type to work correctly on platforms where char defaults to unsigned. Differential Revision: http://reviews.llvm.org/D18981 llvm-svn: 266311
* Make Scalar::GetBytes and RegisterValue::GetBytes constUlrich Weigand2016-04-146-194/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scalar::GetBytes provides a non-const access to the underlying bytes of the scalar value, supposedly allowing for modification of those bytes. However, even with the current implementation, this is not really possible. For floating-point scalars, the pointer returned by GetBytes refers to a temporary copy; modifications to that copy will be simply ignored. For integer scalars, the pointer refers to internal memory of the APInt implementation, which isn't supposed to be directly modifyable; GetBytes simply casts aways the const-ness of the pointer ... With my upcoming patch to fix Scalar::GetBytes for big-endian systems, this problem is going to get worse, since there we need temporary copies even for some integer scalars. Therefore, this patch makes Scalar::GetBytes const, fixing all those problems. As a follow-on change, RegisterValues::GetBytes must be made const as well. This in turn means that the way of initializing a RegisterValue by doing a SetType followed by writing to GetBytes no longer works. Instead, I've changed SetValueFromData to do the equivalent of SetType itself, and then re-implemented SetFromMemoryData to work on top of SetValueFromData. There is still a need for RegisterValue::SetType, since some platform-specific code uses it to reinterpret the contents of an already filled RegisterValue. To make this usage work in all cases (even changing from a type implemented via Scalar to a type implemented as a byte buffer), SetType now simply copies the old contents out, and then reloads the RegisterValue from this data using the new type via SetValueFromData. This in turn means that there is no remaining caller of Scalar::SetType, so it can be removed. The only other follow-on change was in MIPS EmulateInstruction code, where some uses of RegisterValue::GetBytes could be made const trivially. Differential Revision: http://reviews.llvm.org/D18980 llvm-svn: 266310
* Fixes for platforms that default to unsigned charUlrich Weigand2016-04-143-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | This fixes several test case failure on s390x caused by the fact that on this platform, the default "char" type is unsigned. - In ClangASTContext::GetBuiltinTypeForEncodingAndBitSize we should return an explicit *signed* char type for encoding eEncodingSint and bit size 8, instead of the default platform char type (which may be unsigned). This fix matches existing code in ClangASTContext::GetIntTypeFromBitSize, and fixes the TestClangASTContext.TestBuiltinTypeForEncodingAndBitSize unit test case. - The test/expression_command/char/TestExprsChar.py test case is known to fail on platforms defaulting to unsigned char (pr23069), and just needs to be xfailed on s390x like on arm. - The test/functionalities/watchpoint/watchpoint_on_vectors/main.c test case defines a vector of "char" and implicitly assumes to be signed. Use an explicit "signed char" instead. Differential Revision: http://reviews.llvm.org/D18979 llvm-svn: 266309
* Support Linux on SystemZ as platformUlrich Weigand2016-04-1447-5/+2882
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Linux on SystemZ: - A new ArchSpec value of eCore_s390x_generic - A new directory Plugins/ABI/SysV-s390x providing an ABI implementation - Register context support - Native Linux support including watchpoint support - ELF core file support - Misc. support throughout the code base (e.g. breakpoint opcodes) - Test case updates to support the platform This should provide complete support for debugging the SystemZ platform. Not yet supported are optional features like transaction support (zEC12) or SIMD vector support (z13). There is no instruction emulation, since our ABI requires that all code provide correct DWARF CFI at all PC locations in .eh_frame to support unwinding (i.e. -fasynchronous-unwind-tables is on by default). The implementation follows existing platforms in a mostly straightforward manner. A couple of things that are different: - We do not use PTRACE_PEEKUSER / PTRACE_POKEUSER to access single registers, since some registers (access register) reside at offsets in the user area that are multiples of 4, but the PTRACE_PEEKUSER interface only allows accessing aligned 8-byte blocks in the user area. Instead, we use a s390 specific ptrace interface PTRACE_PEEKUSR_AREA / PTRACE_POKEUSR_AREA that allows accessing a whole block of the user area in one go, so in effect allowing to treat parts of the user area as register sets. - SystemZ hardware does not provide any means to implement read watchpoints, only write watchpoints. In fact, we can only support a *single* write watchpoint (but this can span a range of arbitrary size). In LLDB this means we support only a single watchpoint. I've set all test cases that require read watchpoints (or multiple watchpoints) to expected failure on the platform. [ Note that there were two test cases that install a read/write watchpoint even though they nowhere rely on the "read" property. I've changed those to simply use plain write watchpoints. ] Differential Revision: http://reviews.llvm.org/D18978 llvm-svn: 266308
* Add new ABI callback to provide fallback unwind register locationsUlrich Weigand2016-04-144-26/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the UnwindPlan did not identify how to unwind the stack pointer register, LLDB currently assumes it can determine to caller's SP from the current frame's CFA. This is true on most platforms where CFA is by definition equal to the incoming SP at function entry. However, on the s390x target, we instead define the CFA to equal the incoming SP plus an offset of 160 bytes. This is because our ABI defines that the caller has to provide a register save area of size 160 bytes. This area is allocated by the caller, but is considered part of the callee's stack frame, and therefore the CFA is defined as pointing to the top of this area. In order to make this work on s390x, this patch introduces a new ABI callback GetFallbackRegisterLocation that provides platform- specific fallback register locations for unwinding. The existing code to handle SP unwinding as well as volatile registers is moved into the default implementation of that ABI callback, to allow targets where that implementation is incorrect to override it. This patch in itself is a no-op for all existing platforms. But it is a pre-requisite for adding s390x support. Differential Revision: http://reviews.llvm.org/D18977 llvm-svn: 266307
* Return back the zero parameter of aggregate initialization in ↵George Rimar2016-04-141-1/+1
| | | | | | | | | | | OutputSectionFactory::lookup(). That was removed in r266304, but leads to warnings by Clang. Thanks to Rafael Espíndola for pointing on that. Though I think change was legal from point of C++. llvm-svn: 266306
* [sanitizer] remove FreeBSD PS_STRINGS fallbackEd Maste2016-04-141-4/+5
| | | | | | | | | | | | The PS_STRINGS constant can easily be incorrect with mismatched kernel/userland - e.g. when building i386 sanitizers on FreeBSD/amd64 with -m32. The kern.ps_strings sysctl was introduced over 20 years ago as the supported way to fetch the environment and argument string addresses from the kernel, so the fallback is never used. Differential Revision: http://reviews.llvm.org/D19027 llvm-svn: 266305
* Make OutputSectionFactory::lookup() inline. NFC.George Rimar2016-04-141-8/+4
| | | | | | | Also I removed the last zero parameter of aggregate initialization as it is excessive here. llvm-svn: 266304
* Removed excessive line. NFC.George Rimar2016-04-141-2/+1
| | | | llvm-svn: 266303
* Reduce expression to single line. NFC.George Rimar2016-04-141-3/+1
| | | | llvm-svn: 266302
* Summary:Simon Dardis2016-04-1413-49/+73
| | | | | | | | | | Alias 'jic $reg, 0' to 'jrc $reg' and 'jialc $reg, 0' to 'jalrc $reg' like binutils. This patch was previous committed as r266055 as seemed to have caused some spurious test failures. They did not reappear after further local testing. llvm-svn: 266301
* Revert "Make tsan tests more portable (take 2)"Renato Golin2016-04-1451-63/+63
| | | | | | This reverts commit r266294, as it broke some buildbots again. :/ llvm-svn: 266300
* Clang formated file. NFC.George Rimar2016-04-141-10/+9
| | | | llvm-svn: 266299
* Combine code branch into single line. NFC.George Rimar2016-04-141-5/+2
| | | | llvm-svn: 266298
* [sanitizer] [SystemZ] Abort if the kernel might be vulnerable to CVE-2016-2143.Marcin Koscielnicki2016-04-145-0/+89
| | | | | | | | | | | | | | | | | | In short, CVE-2016-2143 will crash the machine if a process uses both >4TB virtual addresses and fork(). ASan, TSan, and MSan will, by necessity, map a sizable chunk of virtual address space, which is much larger than 4TB. Even worse, sanitizers will always use fork() for llvm-symbolizer when a bug is detected. Disable all three by aborting on process initialization if the running kernel version is not known to contain a fix. Unfortunately, there's no reliable way to detect the fix without crashing the kernel. So, we rely on whitelisting - I've included a list of upstream kernel versions that will work. In case someone uses a distribution kernel or applied the fix themselves, an override switch is also included. Differential Revision: http://reviews.llvm.org/D18915 llvm-svn: 266297
* [sanitizer] [SystemZ] Add virtual space size.Marcin Koscielnicki2016-04-142-0/+10
| | | | | | | | | This teaches sanitizer_common about s390 and s390x virtual space size. s390 is unusual in that it has 31-bit virtual space. Differential Revision: http://reviews.llvm.org/D18896 llvm-svn: 266296
* [sanitizer] [SystemZ] Implement internal_mmap.Marcin Koscielnicki2016-04-141-1/+26
| | | | | | | | | | mmap on s390 is quite a special snowflake: since it has too many parameters to pass them in registers, it passes a pointer to a struct with all the parameters instead. Differential Revision: http://reviews.llvm.org/D18889 llvm-svn: 266295
* Make tsan tests more portable (take 2)Renato Golin2016-04-1451-63/+63
| | | | | | | | | Using stderr more uniformily, avoiding potential races when scanning stdout and stderr output. Patch by Maxim Kuvyrkov. llvm-svn: 266294
* [analyzer] Make it possible to query the function name from a CallDescription.Gabor Horvath2016-04-141-0/+3
| | | | llvm-svn: 266293
* [ASTImporter] Implement some expression-related AST node import.Artem Dergachev2016-04-144-59/+995
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce ASTImporter unit test framework. Fix a memory leak introduced in cf8ccff5: an array is allocated in ImportArray and never freed. Support new node kinds: - GCCAsmStmt - AddrLabelExpr - AtomicExpr - CompoundLiteralExpr - CXXBoolLiteralExpr - CXXNullPtrLiteralExpr - CXXThisExpr - DesignatedInitExpr - GNUNullExpr - ImplicitValueInitExpr - InitListExpr - OpaqueValueExpr - PredefinedExpr - ParenListExpr - StmtExpr - VAArgExpr - BinaryConditionalOperator - ConditionalOperator - FloatingLiteral - StringLiteral - InjectedClassNameType - TemplateTypeParmType - LabelDecl Patch by Aleksei Sidorin! Differential Revision: http://reviews.llvm.org/D14286 llvm-svn: 266292
* asan: fix buildDmitry Vyukov2016-04-141-1/+1
| | | | | | | | | | | Some bots failed with: sanitizer_quarantine.h:104:7: error: unused typedef 'assertion_failed__104' [-Werror,-Wunused-local-typedef] COMPILER_CHECK(kPrefetch <= ARRAY_SIZE(b->batch)); Replace COMPILER_CHECK with CHECK. llvm-svn: 266291
* Reapply r258505 after r266254, this time with a comment to make it more sticky.Nico Weber2016-04-141-1/+7
| | | | llvm-svn: 266290
* [Coverage] Update testing methods to support more than two filesIgor Kudrin2016-04-141-11/+58
| | | | | | Differential Revision: http://reviews.llvm.org/D18757 llvm-svn: 266289
* asan: fix out-of-bounds access in quarantineDmitry Vyukov2016-04-141-2/+4
| | | | llvm-svn: 266288
* [MSVC] Fix check for wchar_t type in case of -fno-wcharDmitry Polukhin2016-04-142-1/+23
| | | | | | | | | | | The example below should work identically with and without compiler native wchar_t support. void foo(wchar_t * t = L""); Differential Revision: http://reviews.llvm.org/D19056 llvm-svn: 266287
* FileSpec: make matching separator-agnostic againPavel Labath2016-04-142-6/+22
| | | | | | | | | | | | | | | | | | | | | Summary: In D18689, I removed the call to Normalize() in FileSpec::SetFile, because it no longer seemed needed, and it resolved a quirk in the FileSpec API (spec.GetCString() returnes a path with backslashes, but spec.GetDirectory().GetCString() has forward slashes). This turned out to be a problem because we would consider paths with different separators as different (which led to unresolved breakpoints for instance). Here, I am putting back in the call to Normalize() and adding a unittest for FileSpec::Equal. I am commenting out the GetDirectory unittests until we figure out the what is the expected behaviour here. Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D19060 llvm-svn: 266286
* [mips] Remove duplicate tests and add missing prefixes for *-LABEL checks. NFC.Vasileios Kalintiris2016-04-144-419/+119
| | | | | | | | | | | | | | | Summary: The only difference between the removed tests and the pre-existing ones, is the materialization of the zero constant, which shouldn't matter for these cases. Reviewers: dsanders, sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D18693 llvm-svn: 266285
* [Coverage] Avoid unnecessary copying of std::vectorIgor Kudrin2016-04-141-7/+16
| | | | | | | | Approved by: Justin Bogner <mail@justinbogner.com> Differential Revision: http://reviews.llvm.org/D18756 llvm-svn: 266284
* [tsan] Fix size reporting for OS X zone allocator with 0-sized allocationsKuba Brecka2016-04-142-1/+25
| | | | | | | | The custom zone implementation for OS X must not return 0 (even for 0-sized allocations). Returning 0 indicates that the pointer doesn't belong to the zone. This can break existing applications. The underlaying allocator allocates 1 byte for 0-sized allocations anyway, so returning 1 in this case is okay. Differential Revision: http://reviews.llvm.org/D19100 llvm-svn: 266283
* Revert "Support arbitrary addrspace pointers in masked load/store intrinsics"Adam Nemet2016-04-1412-339/+206
| | | | | | | | This reverts commit r266086. It breaks the LTO build of gcc in SPEC2000. llvm-svn: 266282
* ThinLTO: linkonce compile-time optimization, do not bother when there is ↵Mehdi Amini2016-04-141-0/+4
| | | | | | | only one input file From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266281
* [Clang][AVX512][BUILTIN] Adding support for intrinsics of ↵Michael Zuckerman2016-04-145-0/+827
| | | | | | | | vpmov{d|q}{b|w|d}{128|256|512} instruction set Differential Revision: http://reviews.llvm.org/D19055 llvm-svn: 266280
* [CodeGen] Teach LLVM how to lower @llvm.{min,max}num to {MIN,MAX}NANDavid Majnemer2016-04-1410-74/+151
| | | | | | | | | | | | | | | The behavior of {MIN,MAX}NAN differs from that of {MIN,MAX}NUM when only one of the inputs is NaN: -NUM will return the non-NaN argument while -NAN would return NaN. It is desirable to lower to @llvm.{min,max}num to -NAN if they don't have a native instruction for -NUM. Notably, ARMv7 NEON's vmin has the -NAN semantics. N.B. Of course, it is only safe to do this if the intrinsic call is marked nnan. llvm-svn: 266279
* [Clang][AVX512][Builtin] Adding intrinsics of ↵Michael Zuckerman2016-04-145-0/+832
| | | | | | | | vpmovus{d|q}{b|w|d}{128|256|512} instruction set Differential Revision: http://reviews.llvm.org/D19050 llvm-svn: 266278
* Make sure the LLVMContext outlive the CompilerInstanceMehdi Amini2016-04-141-1/+1
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266277
* Do not use llvm:getGlobalContext() in unittestsMehdi Amini2016-04-141-1/+2
| | | | | | | Currently trying to nuke this API from LLVM. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266276
OpenPOWER on IntegriCloud