summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [CodeView] Emit the correct TypeIndex for std::nullptr_t.Zachary Turner2018-11-014-0/+54
| | | | | | | | | | | | | | | | | | | | | | The TypeIndex used by cl.exe is 0x103, which indicates a SimpleTypeMode of NearPointer (note the absence of the bitness, normally pointers use a mode of NearPointer32 or NearPointer64) and a SimpleTypeKind of void. So this is basically a void*, but without a specified size, which makes sense given how std::nullptr_t is defined. clang-cl was actually not emitting *anything* for this. Instead, when we encountered std::nullptr_t in a DIType, we would actually just emit a TypeIndex of 0, which is obviously wrong. std::nullptr_t in DWARF is represented as a DW_TAG_unspecified_type with a name of "decltype(nullptr)", so we add that logic along with a test, as well as an update to the dumping code so that we no longer print void* when dumping 0x103 (which would previously treat Void/NearPointer no differently than Void/NearPointer64). Differential Revision: https://reviews.llvm.org/D53957 llvm-svn: 345811
* [PowerPC] Support constraint 'wi' in asmLi Jia He2018-11-013-2/+30
| | | | | | | | | | From the gcc manual, we can see that the specific limit of wi inline asm is “FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS”. The link is https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/Machine-Constraints.html#Machine-Constraints. We should accept this constraint. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D53265 llvm-svn: 345810
* [Clang][PowerPC] Support constraint 'wi' in asmLi Jia He2018-11-011-0/+1
| | | | | | | | | | From the gcc manual, we can see that the specific limit of wi inline asm is “FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS”. The link is https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/Machine-Constraints.html#Machine-Constraints. We should accept this constraint. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D53265 llvm-svn: 345809
* [COFF, ARM64] Implement llvm.addressofreturnaddress intrinsicMandeep Singh Grang2018-11-013-1/+7
| | | | llvm-svn: 345808
* [analyzer] SARIF: Suppress version testing in a more downstream-friendly manner.Artem Dergachev2018-11-012-2/+2
| | | | | | No functional change intended. llvm-svn: 345807
* [WebAssembly] Remove duplicate function. NFC.Sam Clegg2018-11-014-28/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D53963 llvm-svn: 345806
* Fix typo in comment.Richard Smith2018-11-011-1/+1
| | | | llvm-svn: 345805
* [WebAssembly] Fix type names in truncation builtinsThomas Lively2018-11-013-16/+16
| | | | | | | | | | | | Summary: Use the same convention as all the other WebAssembly builtin names. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits Differential Revision: https://reviews.llvm.org/D53724 llvm-svn: 345804
* Fix regression in behavior of clang -x c++-header -fmodule-name=XXXRichard Smith2018-11-015-4/+33
| | | | | | | | | | | | -fsyntax-only. The driver accidentally stopped passing the input filenames on to -cc1 in this mode due to confusion over what action was being requested. This change also fixes a couple of crashes I encountered when passing multiple files to such a -cc1 invocation. llvm-svn: 345803
* [analyzer] pr39348: MallocChecker: Realize that sized delete isn't custom ↵Artem Dergachev2018-11-013-55/+53
| | | | | | | | | | | | | | | | | | | | | | | | | delete. MallocChecker no longer thinks that operator delete() that accepts the size of the object to delete (available since C++14 or under -fsized-deallocation) is some weird user-defined operator. Instead, it handles it like normal delete. Additionally, it exposes a regression in NewDelete-intersections.mm's testStandardPlacementNewAfterDelete() test, where the diagnostic is delayed from before the call of placement new into the code of placement new in the header. This happens because the check for pass-into-function-after-free for placement arguments is located in checkNewAllocator(), which happens after the allocator is inlined, which is too late. Move this use-after-free check into checkPreCall instead, where it works automagically because the guard that prevents it from working is useless and can be removed as well. This commit causes regressions under -analyzer-config c++-allocator-inlining=false but this option is essentially unsupported because the respective feature has been enabled by default quite a while ago. Differential Revision: https://reviews.llvm.org/D53543 llvm-svn: 345802
* X86: Consistently declare pass initializers in X86.h; NFCMatthias Braun2018-11-0110-55/+13
| | | | | | | This avoids declaring them twice: in X86TargetMachine.cpp and the file implementing the pass. llvm-svn: 345801
* [FileSystem] Move EnumerateDirectory from FileSpec to FileSystem.Jonas Devlieghere2018-11-0114-181/+142
| | | | | | | | | | | | | | This patch moves the EnumerateDirectory functionality and related enum and typedef from FileSpec to FileSystem. This is part of a set of patches that extracts file system related convenience methods from FileSpec. The long term goal is to remove this method altogether and use the iterators directly, but for introducing the VFS into LLDB this change is sufficient. Differential revision: https://reviews.llvm.org/D53785 llvm-svn: 345800
* [FileSystem] Re-add EnumerateDirectoryJonas Devlieghere2018-11-013-0/+76
| | | | | | Re-enable EnumerateDirectory now that no_push is available in llvm (r345793). llvm-svn: 345799
* [XRay] Add CPU ID in Custom Event FDR RecordsDean Michael Berris2018-11-0111-24/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change cuts across compiler-rt and llvm, to increment the FDR log version number to 4, and include the CPU ID in the custom event records. This is a step towards allowing us to change the `llvm::xray::Trace` object to start representing both custom and typed events in the stream of records. Follow-on changes will allow us to change the kinds of records we're presenting in the stream of traces, to incorporate the data in custom/typed events. A follow-on change will handle the typed event case, where it may not fit within the 15-byte buffer for metadata records. This work is part of the larger effort to enable writing analysis and processing tools using a common in-memory representation of the events found in traces. The work will focus on porting existing tools in LLVM to use the common representation and informing the design of a library/framework for expressing trace event analysis as C++ programs. Reviewers: mboerger, eizan Subscribers: hiraditya, mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D53920 llvm-svn: 345798
* [WebAssembly] Lower vselectThomas Lively2018-11-012-0/+99
| | | | | | | | | | Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D53630 llvm-svn: 345797
* Compile and test i128 math builtins for Win64Reid Kleckner2018-11-0139-48/+104
| | | | | | | | | | | | | | | | | | | | | Summary: Windows has always been LLP64, not LP64, so the macros were incorrect. Check for _WIN64, since AArch64 sets that too. The tests have to be fixed up in two main ways: 1. Use 'ULL' suffixes to avoid sign extension when passing hex literals with the sign bit set to signed 128 arguments. Clang -fms-compatibility makes such hex literals signed, not unsigned. 2. Disable various tests for 80-bit long double interoperation with i128 values. Reviewers: joerg, mstorsjo Subscribers: javed.absar, kristof.beyls, hiraditya, aheejin, llvm-commits Differential Revision: https://reviews.llvm.org/D53918 llvm-svn: 345796
* [WebAssembly] Process p2align operands for SIMD loads and storesThomas Lively2018-10-313-96/+642
| | | | | | | | | | Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D53886 llvm-svn: 345795
* [WebAssembly] Handle vector IMPLICIT_DEFs.Thomas Lively2018-10-312-34/+122
| | | | | | | | | | | | | | Summary: Also reduce the test case for implicit defs and test it with all register classes. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D53855 llvm-svn: 345794
* [VFS] Add support for "no_push" to VFS recursive iterators.Jonas Devlieghere2018-10-313-20/+115
| | | | | | | | | | | The "regular" file system has a useful feature that makes it possible to stop recursing when using the recursive directory iterators. This functionality was missing for the VFS recursive iterator and this patch adds that. Differential revision: https://reviews.llvm.org/D53465 llvm-svn: 345793
* [COFF, ARM64] Change setjmp for AArch64 Windows to use Intrinsic.sponentryMandeep Singh Grang2018-10-312-4/+7
| | | | | | | | | | | | | | Summary: ARM64 setjmp expects sp on entry instead of framepointer. Reviewers: mgrang, rnk, TomTan, compnerd, mstorsjo, efriedma Reviewed By: mstorsjo Subscribers: javed.absar, kristof.beyls, chrib, cfe-commits Differential Revision: https://reviews.llvm.org/D53684 llvm-svn: 345792
* [COFF, ARM64] Implement Intrinsic.sponentry for AArch64Mandeep Singh Grang2018-10-3110-30/+191
| | | | | | | | | | | | | | Summary: This patch adds Intrinsic.sponentry. This intrinsic is required to correctly support setjmp for AArch64 Windows platform. Reviewers: mgrang, TomTan, rnk, compnerd, mstorsjo, efriedma Reviewed By: efriedma Subscribers: majnemer, chrib, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D53673 llvm-svn: 345791
* [IR] Allow increasing the alignment of dso-local globals.Eli Friedman2018-10-312-2/+8
| | | | | | | | | I think this is the actual important property; the previous visibility check was an approximation. Differential Revision: https://reviews.llvm.org/D53852 llvm-svn: 345790
* [InlineCost] Remove a dead constant; NFCGeorge Burgess IV2018-10-311-1/+0
| | | | | | | | | | My `grep`-fu indicates that this hasn't been used for years. It also no longer makes much sense to have this flavor of penalty in general, since a call to a noreturn should mean that we're in a BB that's terminated by `unreachable`. That case is accounted for by CallAnalyzer::allowSizeGrowth. llvm-svn: 345789
* [compiler-rt] Pass CMake C and C++ flags to the custom libc++Petr Hosek2018-10-311-3/+7
| | | | | | | | | | | When building the custom libc++ that's used by libFuzzer as well as MSan and TSan tests, passthrough the C and C++ flags that were passed to the compiler-rt CMake build. These may be needed to successfuly compile the library on a particular platform. Differential Revision: https://reviews.llvm.org/D53862 llvm-svn: 345788
* [FileSystem] Remove EnumerateDirectoryJonas Devlieghere2018-10-313-76/+0
| | | | | | | | The new implementation of EnumerateDirectory relies on `::no_push()` being implemented for the VFS recursive directory iterators. However this patch (D53465) hasn't been landed yet. llvm-svn: 345787
* [AArch64] Sort switch cases (NFC)Evandro Menezes2018-10-311-20/+23
| | | | llvm-svn: 345786
* Revert r345165 "[X86] Bring back the MOV64r0 pseudo instruction"Craig Topper2018-10-3117-523/+472
| | | | | | Google is reporting regressions on some benchmarks. llvm-svn: 345785
* Revert "[ASTImporter][Structural Eq] Check for isBeingDefined"Shafik Yaghmour2018-10-312-46/+1
| | | | | | | | This reverts commit r345760 because it caused an assertion in the lldb test suite. This is the log from the build bot: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/12003/ llvm-svn: 345784
* [FileSystem] Extend file system and have it use the VFS.Jonas Devlieghere2018-10-3132-68/+632
| | | | | | | | | | | | | | | | This patch extends the FileSystem class with a bunch of functions that are currently implemented as methods of the FileSpec class. These methods will be removed in future commits and replaced by calls to the file system. The new functions are operated in terms of the virtual file system which was recently moved from clang into LLVM so it could be reused in lldb. Because the VFS is stateful, we turned the FileSystem class into a singleton. Differential revision: https://reviews.llvm.org/D53532 llvm-svn: 345783
* [ARM] Add missing pseudo-instruction for Thumb1 RSBS.Eli Friedman2018-10-318-49/+32
| | | | | | | | | Shows up rarely for 64-bit arithmetic, more frequently for the compare patterns added in r325323. Differential Revision: https://reviews.llvm.org/D53848 llvm-svn: 345782
* [AArch64] [Windows] Emit unwind tables by default.Eli Friedman2018-10-311-5/+5
| | | | | | | | | Unwind tables are necessary even in code that doesn't support exceptions. The tables are used for setjmp(), and by debuggers. Differential Revision: https://reviews.llvm.org/D53618 llvm-svn: 345781
* revert rL345717 : [InstSimplify] fold icmp based on range of abs/nabsSanjay Patel2018-10-312-57/+75
| | | | | | | This can miscompile as shown in PR39510: https://bugs.llvm.org/show_bug.cgi?id=39510 llvm-svn: 345780
* [ARM64] [Windows] Implement _InterlockedExchangeAdd*_* builtins.Eli Friedman2018-10-315-54/+174
| | | | | | | | | These apparently need to be proper builtins to handle the Windows SDK. Differential Revision: https://reviews.llvm.org/D53916 llvm-svn: 345779
* Check shouldReduceLoadWidth from SimplifySetCCStanislav Mekhanoshin2018-10-313-1/+79
| | | | | | | | | | | | SimplifySetCC could shrink a load without checking for profitability or legality of such shink with a target. Added checks to prevent shrinking of aligned scalar loads in AMDGPU below dword as scalar engine does not support it. Differential Revision: https://reviews.llvm.org/D53846 llvm-svn: 345778
* [ValueTracking] add tests for fmin/fmax; NFCSanjay Patel2018-10-311-0/+176
| | | | llvm-svn: 345777
* [DWARF][NFC] Refactor a function to return Optional<> instead of boolWolfgang Pieb2018-10-313-10/+10
| | | | | | | | Minor refactor of DWARFUnit::getStringOffsetSectionItem(). Differential Revision: https://reviews.llvm.org/D53948 llvm-svn: 345776
* [ELF] Refactor per-target TLS layout configuration. NFC.Ryan Prichard2018-10-315-34/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There are really three different kinds of TLS layouts: * A fixed TLS-to-TP offset. On architectures like PowerPC, MIPS, and RISC-V, the thread pointer points to a fixed offset from the start of the executable's TLS segment. The offset is 0x7000 for PowerPC and MIPS, which allows a signed 16-bit offset to reach 0x1000 of per-thread implementation data and 0xf000 of the application's TLS segment. The size and layout of the TCB isn't relevant to the static linker and might not be known. * A fixed TCB size. This is the format documented as "variant 1" in Ulrich Drepper's TLS spec. The thread pointer points to a 2-word TCB followed by the executable's TLS segment. The first word is always the DTV pointer. Used on ARM. The thread pointer must be aligned to the TLS segment's alignment, possibly creating alignment padding. * Variant 2. This format predates variant 1 and is also documented in Drepper's TLS spec. It allocates the executable's TLS segment before the thread pointer, apparently for backwards-compatibility. It's used on x86 and SPARC. Factor out an lld::elf::getTlsTpOffset() function for use in a follow-up patch for Android. The TcbSize/TlsTpOffset fields are only used in getTlsTpOffset, so replace them with a switch on Config->EMachine. Reviewers: espindola, ruiu, PkmX, jrtc27 Reviewed By: ruiu, PkmX, jrtc27 Subscribers: jyknight, emaste, sdardis, nemanjai, javed.absar, arichardson, kristof.beyls, kbarton, fedor.sergeev, atanasyan, PkmX, jsji, llvm-commits Differential Revision: https://reviews.llvm.org/D53905 llvm-svn: 345775
* Part of PR39508: Emit an @llvm.invariant.start after storing toRichard Smith2018-10-314-14/+29
| | | | | | | | | | | | | | | | | __tls_guard. __tls_guard can only ever transition from 0 to 1, and only once. This permits LLVM to remove repeated checks for TLS initialization and repeated initialization code in cases like: int g(); thread_local int n = g(); int a = n + n; where we could not prove that __tls_guard was still 'true' when checking it for the second reference to 'n' in the initializer of 'a'. llvm-svn: 345774
* Remove unused internal template parameter.Richard Smith2018-10-311-3/+1
| | | | llvm-svn: 345773
* [adt] SparseBitVector::test() should be constDaniel Sanders2018-10-312-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Re-worked SparseBitVector's most-recently-used-word caching (CurrElementIter) such that SparseBitVector::test() can be made const. This came up when attempting to test individual bits in a SparseBitVector which was a member of a const object. The cached iterator has no bearing on the externally visible state, it's merely a performance optimization. Therefore it has been made mutable and FindLowerBound() has been split into a const and non-const function (FindLowerBound/FindLowerBoundConst) for the const/non-const interfaces. Reviewers: rtereshin Reviewed By: rtereshin Subscribers: rtereshin, dexonsmith, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D53447 llvm-svn: 345772
* [InstCombine] add tests for fmin/fmax pattern matching failure; NFCSanjay Patel2018-10-311-2/+44
| | | | llvm-svn: 345771
* [SelectionDAG] Handle constant range [0,1) in lowerRangeToAssertZExtScott Linder2018-10-312-7/+22
| | | | | | | | | lowerRangeToAssertZExt currently relies on something like EarlyCSE having eliminated the constant range [0,1). At -O0 this leads to an assert. Differential Revision: https://reviews.llvm.org/D53888 llvm-svn: 345770
* [globalisel] Add comments indicating the operand orderDaniel Sanders2018-10-311-1/+7
| | | | llvm-svn: 345769
* Makefile.rules: Don't use code signing on macOS; it isn't necessary.Adrian Prantl2018-10-311-2/+3
| | | | llvm-svn: 345768
* [WedAssembly] Add -s and -S alias for --strip-all and --strip-debugSam Clegg2018-10-313-0/+16
| | | | llvm-svn: 345767
* Removing a reliance on system headers from this test; NFC.Aaron Ballman2018-10-311-2/+9
| | | | llvm-svn: 345766
* [compiler-rt][Fuzzer] Use the new C++ ABI namespace CMake supportPetr Hosek2018-10-311-1/+1
| | | | | | | | | libc++ now supports customizing the ABI namespace directly from the CMake build so we no longer need to rely on custom CFLAGS. Differential Revision: https://reviews.llvm.org/D53939 llvm-svn: 345765
* Implement the readability-const-return-type check.Aaron Ballman2018-10-3110-0/+463
| | | | | | | | This check flags function top-level const-qualified return types and suggests removing the mostly-superfluous const qualifier where possible. Patch by Yitzhak Mandelbaum. llvm-svn: 345764
* [AMDGPU] Remove FeatureVGPRSpillingScott Linder2018-10-3115-84/+95
| | | | | | | | | | | This feature is only relevant to shaders, and is no longer used. When disabled, lowering of reserved registers for shaders causes a compiler crash. Remove the feature and add a test for compilation of shaders at OptNone. Differential Revision: https://reviews.llvm.org/D53829 llvm-svn: 345763
* [NFC] Replace C++1y and C++1z by C++14 and C++17, respectivelyLouis Dionne2018-10-312-7/+8
| | | | llvm-svn: 345762
OpenPOWER on IntegriCloud