summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* For P0784R7: support placement new-expressions in constant evaluation.Richard Smith2019-10-034-34/+201
| | | | | | | | | For now, we restrict this support to use from within the standard library implementation, since we're required to make parts of the standard library that use placement new work, but not permitted to make uses of placement new from user code work. llvm-svn: 373547
* For P0784R7: allow direct calls to operator new / operator delete fromRichard Smith2019-10-033-81/+374
| | | | | | std::allocator::{allocate,deallocate} in constant evaluation. llvm-svn: 373546
* [gicombiner] Fix windows issue where single quotes in the command are passed ↵Daniel Sanders2019-10-021-1/+1
| | | | | | through to tablegen llvm-svn: 373545
* [AMDGPU] Fix illegal agpr use by VALUStanislav Mekhanoshin2019-10-023-4/+31
| | | | | | | | | | | | | | | | | | | When SIFixSGPRCopies attempts to fix an illegal copy from vector to scalar register it calls moveToVALU(). A copy from an agpr to sgpr becomes a copy from agpr to agpr, which may result in the illegal register class at a use of this copy. Solution is to copy it always into a vgpr. This may result in a subsequent copy into an agpr if that is what really needed, however should not happen too often and likely will be folded later. The opposite situation may not happen because an sgpr is always illegal where agpr is legal, so such user instructions may not exist. Differential Revision: https://reviews.llvm.org/D68358 llvm-svn: 373544
* [gicombiner] Fix a nullptr dereference when -combiners is given a name that ↵Daniel Sanders2019-10-021-5/+11
| | | | | | | | | isn't defined This is unlikely to be the root cause for the windows bot failures but it would explain the stack trace seen. llvm-svn: 373543
* [InstCombine] Bypass high bit extract before variable sign-extension (PR43523)Roman Lebedev2019-10-023-26/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://rise4fun.com/Alive/8BY - valid for lshr+trunc+variable sext https://rise4fun.com/Alive/7jk - the variable sext can be redundant https://rise4fun.com/Alive/Qslu - 'exact'-ness of first shift can be preserver https://rise4fun.com/Alive/IF63 - without trunc we could view this as more general "drop redundant mask before right-shift", but let's handle it here for now https://rise4fun.com/Alive/iip - likewise, without trunc, variable sext can be redundant. There's more patterns for sure - e.g. we can have 'lshr' as the final shift, but that might be best handled by some more generic transform, e.g. "drop redundant masking before right-shift" (PR42456) I'm singling-out this sext patch because you can only extract high bits with `*shr` (unlike abstract bit masking), and i *know* this fold is wanted by existing code. I don't believe there is much to review here, so i'm gonna opt into post-review mode here. https://bugs.llvm.org/show_bug.cgi?id=43523 llvm-svn: 373542
* [NFC][InstCombine] Add tests for 'variable sext of variable high bit ↵Roman Lebedev2019-10-021-0/+584
| | | | | | | | extract' pattern (PR43523) https://bugs.llvm.org/show_bug.cgi?id=43523 llvm-svn: 373541
* DebugInfo: Rename DebugLocStream::Entry::Begin/EndSym to just Begin/EndDavid Blaikie2019-10-022-17/+13
| | | | | | | | Brings this struct in line with the RangeSpan class so they might eventually be used by common template code for generating range/loc lists with less duplicate code. llvm-svn: 373540
* Move SanitizerInitializeUnwinder outside anonymous namespace.Matt Morehouse2019-10-021-32/+32
| | | | | | Fixes the Android build breakage introduced in r373528. llvm-svn: 373539
* [clang][ifs] Clang Interface Stubs ToolChain plumbing.Puyan Lotfi2019-10-0231-97/+333
| | | | | | | | | | | | | | | | | | | | | This patch enables end to end support for generating ELF interface stubs directly from clang. Now the following: clang -emit-interface-stubs -o libfoo.so a.cpp b.cpp c.cpp will product an ELF binary with visible symbols populated. Visibility attributes and -fvisibility can be used to control what gets populated. * Adding ToolChain support for clang Driver IFS Merge Phase * Implementing a default InterfaceStubs Merge clang Tool, used by ToolChain * Adds support for the clang Driver to involve llvm-ifs on ifs files. * Adds -emit-merged-ifs flag, to tell llvm-ifs to emit a merged ifs text file instead of the final object format (normally ELF) Differential Revision: https://reviews.llvm.org/D63978 llvm-svn: 373538
* [InstCombine] Transform bcopy to memmoveDavid Bolvansky2019-10-023-0/+34
| | | | | | | bcopy is still widely used mainly for network apps. Sadly, LLVM has no optimizations for bcopy, but there are some for memmove. Since bcopy == memmove, it is profitable to transform bcopy to memmove and use current optimizations for memmove for free here. llvm-svn: 373537
* [X86] Add test cases for suboptimal vselect+setcc splitting.Craig Topper2019-10-022-0/+263
| | | | | | | | | | If the vselect result type needs to be split, it will try to also try to split the condition if it happens to be a setcc. With avx512 where k-registers are legal, its probably better to just use a kshift to split the mask register. llvm-svn: 373536
* [LegalizeTypes] Check for already split condition before calilng ↵Craig Topper2019-10-021-4/+4
| | | | | | | | SplitVecRes_SETCC in SplitRes_SELECT. No point in manually splitting the SETCC if it was already done. llvm-svn: 373535
* gn build: (manually) merge r373527Nico Weber2019-10-022-0/+11
| | | | llvm-svn: 373534
* DebugInfo: Simplify RangeSpan to be a plain structDavid Blaikie2019-10-023-21/+15
| | | | | | | | | | | | | | This is an effort to make RangeSpan and DebugLocStream::Entry more similar to share code for their emission (to reuse the more complicated code for using (& choosing when to use) base address selection entries, etc). It didn't seem like this struct was worth the complexity of encapsulation - when the members could be initialized by the ctor to any value (no validation) and the type is assignable (so there's no mutability or other constraint being implemented by its interface). llvm-svn: 373533
* [sanitizer_common] Declare __sanitizer_on_print in Windows interception.Matt Morehouse2019-10-021-0/+1
| | | | | | Speculative fix for Windows bot. llvm-svn: 373532
* [sanitizer_common] Disable onprint.cpp on Android.Matt Morehouse2019-10-021-0/+2
| | | | | | The test fails to find the written file on Android. llvm-svn: 373531
* [sanitizer_common] Add __sanitizer_on_print to interface list.Matt Morehouse2019-10-021-0/+1
| | | | | | Should fix the current Windows buildbot failure. llvm-svn: 373530
* [compiler-rt] Use GetNextInstructionPc in signal handlersVitaly Buka2019-10-026-6/+44
| | | | | | | | | | | | | | | | | | Summary: All other stack trace callers assume that PC contains return address. HWAsan already use GetNextInstructionPc in similar code. PR43339 Reviewers: eugenis, kcc, jfb Subscribers: dexonsmith, dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68313 llvm-svn: 373529
* NFC: add namespace {}Vitaly Buka2019-10-021-0/+4
| | | | llvm-svn: 373528
* [gicombiner] Add the boring boilerplate for the declarative combinerDaniel Sanders2019-10-029-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the first of a series of patches extracted from a much bigger WIP patch. It merely establishes the tblgen pass and the way empty combiner helpers are declared and integrated into a combiner info. The tablegen pass takes a -combiners option to select the combiner helper that will be generated. This can be given multiple values to generate multiple combiner helpers at once. Doing so helps to minimize parsing overhead. The reason for creating a GlobalISel subdirectory in utils/TableGen is that there will be quite a lot of non-pass files (~15) by the time the patch series is done. Reviewers: volkan Subscribers: mgorny, hiraditya, simoncook, Petar.Avramovic, s.egerton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68286 llvm-svn: 373527
* Fix uninitialized variable warning in CodeGenPGO constructor. NFCI.Simon Pilgrim2019-10-021-2/+2
| | | | llvm-svn: 373526
* ItaniumCXXABI - silence static analyzer getAs<RecordType> null dereference ↵Simon Pilgrim2019-10-021-11/+11
| | | | | | | | warnings. NFCI. The static analyzer is warning about potential null dereferences, but we should be able to use castAs<RecordType> directly and if not assert will fire for us. llvm-svn: 373525
* [NFC][libc++abi] Convert stray tabs to spacesLouis Dionne2019-10-022-10/+10
| | | | llvm-svn: 373524
* [Clang][Driver][NFC] Corrected DeviceActionBuilder methods' comments.Sergey Dmitriev2019-10-021-4/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D68355 llvm-svn: 373523
* Recommit "[GlobalOpt] Pass DTU to removeUnreachableBlocks instead of ↵Florian Hahn2019-10-021-7/+3
| | | | | | | | | | | recomputing." The cause for the revert should be fixed by r373513 / a80b6c15425f82521c624ff24c5c0a34cd534d54 This reverts commit 47dbcbd8ec6bf6c0b9cbe5811e81a37cc55e73ef. llvm-svn: 373522
* CGObjCMac - silence static analyzer dyn_cast<>/getAs<> null dereference ↵Simon Pilgrim2019-10-021-6/+4
| | | | | | | | warnings. NFCI. The static analyzer is warning about potential null dereferences, but we should be able to use cast<>/castAs<> directly and if not assert will fire for us. llvm-svn: 373520
* [PowerPC] Fix SH field overflow issueYi-Hong Lyu2019-10-022-4/+66
| | | | | | | | | | Store rlwinm Rx, Ry, 32, 0, 31 as rlwinm Rx, Ry, 0, 0, 31 and store rldicl Rx, Ry, 64, 0 as rldicl Rx, Ry, 0, 0. Otherwise SH field is overflow and fails assertion in assembly printing stage. Differential Revision: https://reviews.llvm.org/D66991 llvm-svn: 373519
* [sanitizer_common] Rename OnPrint to __sanitizer_on_print.Matt Morehouse2019-10-022-1/+38
| | | | | | | | | | | | | | | | | | Summary: https://reviews.llvm.org/D28596 exposed OnPrint in the global namespace, which can cause collisions with user-defined OnPrint() functions. Reviewers: vitalybuka, dvyukov Reviewed By: vitalybuka, dvyukov Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67987 llvm-svn: 373518
* [libc++] Use functions instead of global variables to set libc++ build flagsLouis Dionne2019-10-022-67/+77
| | | | | | | | This commit follows the trend of doing things per-target instead of modifying the C++ flags globally. It does so for visibility-related flags, other basic build flags and Windows-specific flags. llvm-svn: 373517
* Fix inconsistent indentation in TableGen.cppDaniel Sanders2019-10-021-68/+64
| | | | | | | The anonymous namespace starts out (incorrectly) indented but isn't indented from the TimeRegionsOpt declaration onwards. llvm-svn: 373516
* Handle llvm.launder.invariant.group in msan.Evgeniy Stepanov2019-10-023-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [MSan] handle llvm.launder.invariant.group Msan used to give false-positives in class Foo { public: virtual ~Foo() {}; }; // Return true iff *x is set. bool f1(void **x, bool flag); Foo* f() { void *p; bool found; found = f1(&p,flag); if (found) { // p is always set here. return static_cast<Foo*>(p); // False positive here. } return nullptr; } Patch by Ilya Tokar. Reviewers: #sanitizers, eugenis Reviewed By: #sanitizers, eugenis Subscribers: eugenis, Prazek, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68236 llvm-svn: 373515
* [TableGen] Improve error reporting of overlapping definitions (NFC)Evandro Menezes2019-10-021-6/+14
| | | | llvm-svn: 373514
* [Local] Handle terminators with users in removeUnreachableBlocks.Florian Hahn2019-10-022-3/+39
| | | | | | | | | | | | | | | | Terminators like invoke can have users outside the current basic block. We have to replace those users with undef, before replacing the terminator. This fixes a crash exposed by rL373430. Reviewers: brzycki, asbirlea, davide, spatel Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D68327 llvm-svn: 373513
* [libc++] Use a function to set warning flags per targetLouis Dionne2019-10-022-32/+35
| | | | | | | | | | This is part of a larger shift to move to per-target settings and eradicate global variables from the CMake build. I'm starting small with warnings only because those are easy to transition over and I want to see how it pans out, but we can handle all flags like exceptions and RTTI in the future. llvm-svn: 373511
* [ARM64] XPC services are unsupported on device.Davide Italiano2019-10-021-2/+2
| | | | | | | | While around, clean up support for a 8 years old OS. <rdar://problem/55916729> llvm-svn: 373510
* [RegisterContextDarwin_arm64] Include the headers for getsysctlbyname.Davide Italiano2019-10-021-0/+5
| | | | | | | | This code is only used under __arm64__, use the correct guard. <rdar://problem/55916729> llvm-svn: 373509
* [ObjectFileMachO] FileSpec::SetFile() now takes the style as arg.Davide Italiano2019-10-021-1/+1
| | | | | | | | | Another block that's only compiled on __arm64__ and wasn't updated. <rdar://problem/55916729> llvm-svn: 373508
* [ObjectFileMachO] Catch up with FileDesc changes.Davide Italiano2019-10-021-3/+3
| | | | | | | | This didn't show up because nobody built __arm64__ in a while. <rdar://problem/55916729> llvm-svn: 373507
* [libc++] Revert to using PUBLIC instead of PRIVATE when linking system libsLouis Dionne2019-10-021-14/+14
| | | | | | | | It turns out the benchmarks need to link against those libraries explicitly too, so CMake's propagation of PUBLIC dependencies is used. llvm-svn: 373506
* [MemorySSA] Update Phi creation when inserting a Def.Alina Sbirlea2019-10-022-37/+82
| | | | | | | | | MemoryPhis should be added in the IDF of the blocks newly gaining Defs. This includes the blocks that gained a Phi and the block gaining a Def, if the block did not have one before. Resolves PR43427. llvm-svn: 373505
* [Stencil] Hide implementaion detai. NFC.Benjamin Kramer2019-10-021-1/+1
| | | | llvm-svn: 373504
* [ARM] Make helpers static. NFC.Benjamin Kramer2019-10-021-3/+5
| | | | llvm-svn: 373503
* [OPENMP50]Add parsing/sema analysis for declare variant score.Alexey Bataev2019-10-029-15/+101
| | | | | | | | Context selectors may include optional score clause in format `score(<expr>):`, where `<expr>` must be a constant integer expression. Added parsing/sema analysis only. llvm-svn: 373502
* [JSON] Remove Utility/JSON.{h|cpp}Jonas Devlieghere2019-10-025-861/+0
| | | | | | | | | | | | | This patch is the final step in my quest to get rid of the JSON parser in LLDB. Vedant's coverage report [1] shows that it was mostly untested. Furthermore, the LLVM implementation has a much nicer API and using it means one less thing to maintain for LLDB. [1] http://lab.llvm.org:8080/coverage/coverage-reports/index.html Differential revision: https://reviews.llvm.org/D68305 llvm-svn: 373501
* [JSON] Use LLVM's library for encoding JSON in ↵Jonas Devlieghere2019-10-021-20/+17
| | | | | | | | | | | GDBRemoteCommunicationServerCommon This patch replaces the LLDB's JSON implementation with the one from LLVM in GDBRemoteCommunicationServerCommon. Differential revision: https://reviews.llvm.org/D68304 llvm-svn: 373500
* [JSON] Use LLVM's library for encoding JSON in ↵Jonas Devlieghere2019-10-021-11/+10
| | | | | | | | | | | GDBRemoteCommunicationServerPlatform This patch replaces the LLDB's JSON implementation with the one from LLVM in GDBRemoteCommunicationServerPlatform. Differential revision: https://reviews.llvm.org/D68302 llvm-svn: 373499
* [JSON] Use LLVM's library for encoding JSON in GDBRemoteCommunicationClientJonas Devlieghere2019-10-021-10/+10
| | | | | | | | | This patch replaces the LLDB's JSON implementation with the one from LLVM in GDBRemoteCommunicationClient. Differential revision: https://reviews.llvm.org/D68301 llvm-svn: 373498
* [JSON] Use LLVM's library for encoding JSON in GDBRemoteCommunicationServerLLGSJonas Devlieghere2019-10-021-48/+51
| | | | | | | | | This patch replaces the LLDB's JSON implementation with the one from LLVM in GDBRemoteCommunicationServerLLGS. Differential revision: https://reviews.llvm.org/D68299 llvm-svn: 373497
* [X86] Rewrite to the vXi1 subvector insertion code to not rely on the value ↵Craig Topper2019-10-028-2706/+4002
| | | | | | | | | | | | | | of bits that might be undef The previous code tried to do a trick where we would extract the subvector from the location we were inserting. Then xor that with the new value. Take the xored value and clear out the bits above the subvector size. Then shift that xored subvector to the insert location. And finally xor that with the original vector. Since the old subvector was used in both xors, this would leave just the new subvector at the inserted location. Since the surrounding bits had been zeroed no other bits of the original vector would be modified. Unfortunately, if the old subvector came from undef we might aggressively propagate the undef. Then we end up with the XORs not cancelling because they aren't using the same value for the two uses of the old subvector. @bkramer gave me a case that demonstrated this, but we haven't reduced it enough to make it easily readable to see what's happening. This patch uses a safer, but more costly approach. It isolate the bits above the insertion and bits below the insert point and ORs those together leaving 0 for the insertion location. Then widens the subvector with 0s in the upper bits, shifts it into position with 0s in the lower bits. Then we do another OR. Differential Revision: https://reviews.llvm.org/D68311 llvm-svn: 373495
OpenPOWER on IntegriCloud