summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove duplicate option from documentation.Adrian Prantl2017-12-091-5/+0
| | | | llvm-svn: 320258
* [X86] Tag segment prefixes as NOP instruction scheduling classesSimon Pilgrim2017-12-091-7/+8
| | | | llvm-svn: 320257
* Remove some includes from InputFiles.h.Rafael Espindola2017-12-0912-3/+14
| | | | | | | They were not used in InputFiles.h and it was getting too easy to add circular includes. llvm-svn: 320256
* [X86][AVX512] Drop a default NoItinerary argument that isn't used any more. ↵Simon Pilgrim2017-12-091-6/+6
| | | | | | | | NFCI. Requires re-ordering of AVX512_maskable_custom arguments. llvm-svn: 320255
* Fix 'enumeral and non-enumeral type in conditional expression' gcc warning. ↵Simon Pilgrim2017-12-091-1/+1
| | | | | | NFCI. llvm-svn: 320254
* Fix signed/unsigned gcc warning. NFCI.Simon Pilgrim2017-12-091-1/+1
| | | | llvm-svn: 320253
* [InlineFunction] Set debug loc for call to forward varargs.Florian Hahn2017-12-092-0/+68
| | | | | | | | | | | | Reviewers: aprantl, dblaikie, rnk Reviewed By: rnk Subscribers: eraman, llvm-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D40432 llvm-svn: 320252
* Update sanitizer tests for C++14 default in ClangTim Northover2017-12-092-4/+4
| | | | llvm-svn: 320251
* Switch to gnu++14 as the default dialect.Tim Northover2017-12-0915-44/+55
| | | | | | This is C++14 with conforming GNU extensions. llvm-svn: 320250
* [X86] When inserting into the upper bits of a vXi1 vector, make sure we ↵Craig Topper2017-12-092-5/+6
| | | | | | | | | | shift enough bits if we widened the vector. We may need to widen the vector to make the shifts legal, but if we do that we need to make sure we shift left/right after accounting for the new size. If not we can't guarantee we are shifting in zeros. The test cases affected actually show cases where we should move the shifts all together, but that's another problem. llvm-svn: 320248
* Revert and accidentally committed revert commitDylan McKay2017-12-0915-24/+357
| | | | | | This reverts commit r320245. llvm-svn: 320247
* [AVR] Fix two CodeGen testsDylan McKay2017-12-092-7/+7
| | | | | | These were broken because of various printing format changes. llvm-svn: 320246
* Revert "[AVR] Override ParseDirective"Dylan McKay2017-12-0915-357/+24
| | | | | | This reverts commit 57c16f9267969ebb09d6448607999b4a9f40c418. llvm-svn: 320245
* [X86] Improve lowering of concats of mask vectors to better optimize zero ↵Craig Topper2017-12-093-96/+77
| | | | | | | | vector inputs. We were previously using kunpck with zero inputs unnecessarily. And we had cases where we would insert into a zero vector and then insert into larger zero vector incurring two sets of shifts. llvm-svn: 320244
* Relax unaligned access assertion when type is byte alignedDylan McKay2017-12-095-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This relaxes an assertion inside SelectionDAGBuilder which is overly restrictive on targets which have no concept of alignment (such as AVR). In these architectures, all types are aligned to 8-bits. After this, LLVM will only assert that accesses are aligned on targets which actually require alignment. This patch follows from a discussion on llvm-dev a few months ago http://llvm.1065342.n5.nabble.com/llvm-dev-Unaligned-atomic-load-store-td112815.html Reviewers: bogner, nemanjai, joerg, efriedma Reviewed By: efriedma Subscribers: efriedma, cactus, llvm-commits Differential Revision: https://reviews.llvm.org/D39946 llvm-svn: 320243
* Change uses of strncpy in debugserver to strlcpyJason Molenda2017-12-095-15/+15
| | | | | | | | for better safety. <rdar://problem/32906923> llvm-svn: 320242
* Change the ordering that we search for kexts and kernels on the localJason Molenda2017-12-091-7/+22
| | | | | | | | | | | | | | | | | | | | | computer. When doing kernel debugging, lldb scrapes around a few well-known locations to find kexts and kernels. It builds up two lists - kexts and kernels with dSYM, and kexts and kernels without dSYMs. After both lists have failed to provide a file, then we'll call out to things like the DebugSymbols framework to find a kext/kernel. This meant that when you had a kext/kernel on the local computer that did not have debug information, lldb wouldn't consult DebugSymbols etc once it'd locked on to one of these no-debug-info binaries on the local computer. Reorder this so we give DebugSymbols etc a shot at finding a debug-info file before we use any of the no-debug-info binaries that were found on the system. <rdar://problem/34434440> llvm-svn: 320241
* Update PlatformDarwin::GetDeveloperDir to handle the twoJason Molenda2017-12-091-8/+13
| | | | | | | | | | | | | | | | | most common cases where the Xcode.app bundle puts lldb - either as a default part of the bundle, or in a toolchain subdirectory, so the platform subclasses can find files relative to this directory. Dropped support for handling the case where the lldb framework was in /Library/PrivateFrameworks. I think this was intended to handle the case where lldb is installed in / (outside the Xcode.app bundle) - but in that case, we can look in the raw directory file paths to find anything. <rdar://problem/35285622> llvm-svn: 320240
* Revert r320230 to fix buildbots.Richard Trieu2017-12-0910-456/+49
| | | | llvm-svn: 320239
* Fix Driver/darwin-version.c testAlex Lorenz2017-12-091-1/+1
| | | | | | A target argument should be provided to avoid failures on non-Darwin llvm-svn: 320238
* [libFuzzer] make the stack depth signal less agressive, otherwise we are ↵Kostya Serebryany2017-12-091-1/+1
| | | | | | sometimes exploding the corpus size. This still needs more analysis and tuning llvm-svn: 320237
* Revert change in test/msan/textdomain.cc for NetBSDKamil Rytarowski2017-12-091-1/+1
| | | | | | | | SVN r. 320226 This breaks Linux. llvm-svn: 320236
* [driver][darwin] Refactor the target selection code, NFCAlex Lorenz2017-12-093-262/+384
| | | | | | | | | | | | | | | | | The simulator variant of Darwin's platforms is removed in favor of a new environment field. The code that selects the platform and the version is split into 4 different functions instead of being all in one function. This is an NFC commit, although it slightly improves the "invalid version number" diagnostic by displaying the environment variable instead of -m<os>-version-min if the OS version was derived from the environment. rdar://35813850 Differential Revision: https://reviews.llvm.org/D41035 llvm-svn: 320235
* Correct handling of the TLS/NetBSD block of the main programKamil Rytarowski2017-12-091-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Include <sys/tls.h> for: - struct tls_tcb - thread control block structure - __HAVE___LWP_GETTCB_FAST - __lwp_gettcb_fast() is available - __HAVE___LWP_GETPRIVATE_FAST - __lwp_getprivate_fast() is available - __HAVE_TLS_VARIANT_I - TLS Variant I for this architecture - __HAVE_TLS_VARIANT_II - TLS Variant II for this architecture Rename ThreadSelfSegbase() to ThreadSelfTlsTcb and switch it to retrieve in a portable way TCB. Switch ThreadSelf() to retrieve pthread from struct tcb_tls. Use dl_iterate_phdr() to find out the size of TLS block of the main program. Correct the index of the TLS block of the main program (dlpi_tls_modid); it's 1, not 2. New NetBSD code is now CPU (NetBSD port) agnostic. Stop sharing the same code with FreeBSD. Sponsored by <The NetBSD Foundation> Reviewers: dvyukov, joerg, vitalybuka Reviewed By: vitalybuka Subscribers: emaste, kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40159 llvm-svn: 320234
* Fix fsanitize-blacklist test on Windows.Evgeniy Stepanov2017-12-091-2/+2
| | | | | | Broken in r320232. llvm-svn: 320233
* Hardware-assisted AddressSanitizer (clang part).Evgeniy Stepanov2017-12-0922-21/+217
| | | | | | | | | | | | | | Summary: Driver, frontend and LLVM codegen for HWASan. A clone of ASan, basically. Reviewers: kcc, pcc, alekseyshl Subscribers: srhines, javed.absar, cfe-commits Differential Revision: https://reviews.llvm.org/D40936 llvm-svn: 320232
* Hardware-assisted AddressSanitizer (compiler-rt)Evgeniy Stepanov2017-12-0928-1/+2453
| | | | | | | | | | | | | | Summary: Runtime library for HWASan, initial commit. Does not randomize tags yet, does not handle stack or globals. Reviewers: kcc, pcc, alekseyshl Subscribers: srhines, kubamracek, dberris, mgorny, llvm-commits, krytarowski Differential Revision: https://reviews.llvm.org/D40935 llvm-svn: 320231
* [ODRHash] Support ODR violation detection in functions.Richard Trieu2017-12-0910-49/+456
| | | | | | | Extend the hashing to functions, which allows detection of function definition mismatches across modules. llvm-svn: 320230
* [MachineOutliner] Outline callsJessica Paquette2017-12-092-4/+134
| | | | | | | | | | | | | The outliner previously would never outline calls. Calls are pretty common in files, so it makes sense to outline them. In fact, in the LLVM test suite, if you count the number of instructions that the outliner misses when you outline calls vs when you don't, it turns out that, on average, around 6% of the instructions encountered are calls. So, if we outline calls, we can find more candidates, and thus save some more space. This commit adds that functionality and updates the mir test to reflect that. llvm-svn: 320229
* Fix test/msan/iconv.cc on NetBSDKamil Rytarowski2017-12-091-2/+2
| | | | | | | | | | | | | | | | | | | Summary: NetBSD still uses the old POSIX iconv(3) signature with the 2nd const argument. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41017 llvm-svn: 320228
* [NFC] Change the string offsets table tests to generate the object on the flyWolfgang Pieb2017-12-0920-211/+262
| | | | | | | | which enables us to remove the test scripts and object files from the repository. https://reviews.llvm.org/D40914 llvm-svn: 320227
* Fix test/msan/textdomain.cc on NetBSDKamil Rytarowski2017-12-091-1/+1
| | | | | | | | | | | | | | | | | | | Summary: This tests must be linked with -lintl for the gettext(3) features. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41013 llvm-svn: 320226
* Disable test/msan/tsearch.cc on NetBSDKamil Rytarowski2017-12-091-0/+3
| | | | | | | | | | | | | | | | | | | Summary: This test uses GNU-specific extension to libc: tdestroy() and as-is is not compatible with NetBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41011 llvm-svn: 320225
* Disable test/msan/pvalloc.cc on NetBSDKamil Rytarowski2017-12-091-1/+1
| | | | | | | | | | | | | | | | | | | Summary: The pvalloc(3) function is a non-standard extension missing on NetBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41014 llvm-svn: 320224
* Fix test/msan/ifaddrs.cc for NetBSDKamil Rytarowski2017-12-091-1/+1
| | | | | | | | | | | | | | | | | | | Summary: NetBSD requires to include <sys/socket.h> for struct sockaddr. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41015 llvm-svn: 320223
* Disable test/msan/ftime.cc on NetBSDKamil Rytarowski2017-12-091-2/+2
| | | | | | | | | | | | | | | | | | | Summary: ftime(3) has been removed from libc/NetBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41018 llvm-svn: 320222
* NetBSD ships with POSIX strerror_r(3)Kamil Rytarowski2017-12-091-1/+1
| | | | | | | | | | | | | | | | | | | Summary: Switch NetBSD from GNU to the POSIX strerror_r(3) interceptor. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41019 llvm-svn: 320221
* Don't link NetBSD programs with -ldl in linkXRayRuntimeDepsKamil Rytarowski2017-12-091-1/+2
| | | | | | | | | | | | | | | | | | | Summary: There is no such library on NetBSD, the corresponding functions like dlopen(3) are in libc. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: dberris, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41021 llvm-svn: 320220
* Register NetBSD/x86_64 in MemorySanitizer.cppKamil Rytarowski2017-12-091-0/+22
| | | | | | | | | | | | | | | | | | | Summary: Reuse the Linux new mapping as it is. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41022 llvm-svn: 320219
* Add NetBSD/x86_64 mapping in MSanKamil Rytarowski2017-12-092-2/+3
| | | | | | | | | | | | | | | | | | | Summary: Reuse the Linux new mapping as it is. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41023 llvm-svn: 320218
* Hardware-assisted AddressSanitizer (llvm part).Evgeniy Stepanov2017-12-0930-17/+676
| | | | | | | | | | | | | | | | | | | | | Summary: This is LLVM instrumentation for the new HWASan tool. It is basically a stripped down copy of ASan at this point, w/o stack or global support. Instrumenation adds a global constructor + runtime callbacks for every load and store. HWASan comes with its own IR attribute. A brief design document can be found in clang/docs/HardwareAssistedAddressSanitizerDesign.rst (submitted earlier). Reviewers: kcc, pcc, alekseyshl Subscribers: srhines, mehdi_amini, mgorny, javed.absar, eraman, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D40932 llvm-svn: 320217
* Fix out-of-order stepping behavior in programs with sunk instructions.Paul Robinson2017-12-093-1/+116
| | | | | | | | | | | | | | | | | | | MachineSink attempts to place instructions near the basic blocks where they are needed. Once an instruction has been sunk, its location relative to other instructions no longer is consistent with the original source code. In order to ensure correct stepping in the debugger, the debug location for sunk instructions is either merged with the insertion point or erased if the target successor block is empty. Originally submitted as r318679, revised to fix sanitizer failure and improve testing. Patch by Matthew Voss! Differential Revision: https://reviews.llvm.org/D39933 llvm-svn: 320216
* [CodeGen][X86] Fix handling of __fp16 vectors.Akira Hatanaka2017-12-0912-63/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes a bug in IRGen where it generates completely broken code for __fp16 vectors on X86. For example when the following code is compiled: half4 hv0, hv1, hv2; // these are vectors of __fp16. void foo221() { hv0 = hv1 + hv2; } clang generates the following IR, in which two i16 vectors are added: @hv1 = common global <4 x i16> zeroinitializer, align 8 @hv2 = common global <4 x i16> zeroinitializer, align 8 @hv0 = common global <4 x i16> zeroinitializer, align 8 define void @foo221() { %0 = load <4 x i16>, <4 x i16>* @hv1, align 8 %1 = load <4 x i16>, <4 x i16>* @hv2, align 8 %add = add <4 x i16> %0, %1 store <4 x i16> %add, <4 x i16>* @hv0, align 8 ret void } To fix the bug, this commit uses the code committed in r314056, which modified clang to promote and truncate __fp16 vectors to and from float vectors in the AST. It also fixes another IRGen bug where a short value is assigned to an __fp16 variable without any integer-to-floating-point conversion, as shown in the following example: __fp16 a; short b; void foo1() { a = b; } @b = common global i16 0, align 2 @a = common global i16 0, align 2 define void @foo1() #0 { %0 = load i16, i16* @b, align 2 store i16 %0, i16* @a, align 2 ret void } rdar://problem/20625184 Differential Revision: https://reviews.llvm.org/D40112 llvm-svn: 320215
* dwarfdump: Add support for the --diff option.Adrian Prantl2017-12-087-21/+47
| | | | | | | | | --diff Emit the output in a diff-friendly way by omitting offsets and addresses. <rdar://problem/34502625> llvm-svn: 320214
* [X86][Mips] Remove unused method declaration from the X86 and Mips AsmPrinters.Craig Topper2017-12-082-7/+0
| | | | | | Both had a declaration of EmitXRayTable, but there is no method defined in either with that name. There is a emitXRayTable in the base class with a lower case 'e' and they both call that. llvm-svn: 320213
* Remove creation of out-of-bounds value of enumeration type (resulting in UB).Richard Smith2017-12-086-23/+18
| | | | | | | Also remove unnecessary initialization of out-parameters with this value, so that MSan is able to catch errors appropriately. llvm-svn: 320212
* Unify implementation of our two different flavours of -Wtautological-compare,Richard Smith2017-12-084-300/+333
| | | | | | | | | | | | | | | | | | | | | | | | | and fold together into a single function. In so doing, fix a handful of remaining bugs where we would report false positives or false negatives if we promote a signed value to an unsigned type for the comparison. This re-commits r320122 and r320124, minus two changes: * Comparisons between a constant and a non-constant expression of enumeration type never warn, not even if the constant is out of range. We should be warning about the creation of such a constant, not about its use. * We do not use more precise bit-widths for comparisons against bit-fields. The more precise diagnostics probably are the right thing, but we should consider moving them under their own warning flag. Other than the refactoring, this patch should only change the behavior for the buggy cases (where the warnings didn't take into account that promotion from signed to unsigned can leave a range of inaccessible values in the middle of the promoted type). llvm-svn: 320211
* [libFuzzer] Add support for Fuchsia OS.Matt Morehouse2017-12-086-2/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds the initial support for Fuchsia. - LIBFUZZER_FUCHSIA is added as an OS type in FuzzerDefs.h - Fuchsia is, by design, not POSIX compliant. However, it does use ELF and supports common POSIX I/O functions. Thus, FuzzerExtFunctions.h and FuzzerIO.h are implemented by extending the header guards in FuzzerExtFunctionsWeak.cpp and FuzzerIOPosix.cpp to include LIBFUZZER_FUCHSIA. - The platform-specific portions of FuzzerUtil.h are implemented by FuzzerUtilFuchsia.cpp, which makes use of exception ports, syscalls, and the launchpad library. - The experimental equivalence server is not currently supported, so FuzzerShmem.h is implemented by stub methods in FuzzerShmemFuchsia.cpp. Any future implementation will likely involve VMOs. Tested with ASAN/SanCov on Fuchsia/x86-64 with the canonical toy fuzzer. Patch By: aarongreen Reviewers: kcc, morehouse, flowerhack, phosek Reviewed By: kcc, phosek, Eugene.Zelenko Subscribers: srhines, mgorny, Eugene.Zelenko Differential Revision: https://reviews.llvm.org/D40974 llvm-svn: 320210
* [CodeGen] Move printing MO_Immediate operands to MachineOperand::printFrancis Visoiu Mistrih2017-12-086-9/+76
| | | | | | | | | | | | Work towards the unification of MIR and debug output by refactoring the interfaces. Add support for operand subreg index as an immediate to debug printing and use ::print in the MIRPrinter. Differential Review: https://reviews.llvm.org/D40965 llvm-svn: 320209
* Revert part of "Cleanup some GraphTraits iteration code"Duncan P. N. Exon Smith2017-12-082-3/+28
| | | | | | | | | | | | | This reverts part of r300656, which caused a regression in propagateMassToSuccessors by counting edges n^2 times, where n is the number of edges from the source basic block to the same successor basic block. The result was both incorrect and very slow to compute for large values of n (e.g. switches with multiple cases that go to the same basic block). Patch by Andrew Scheidecker! llvm-svn: 320208
OpenPOWER on IntegriCloud