summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [libunwind] Export the weak alias in Mach-OPetr Hosek2019-04-041-0/+1
| | | | | | | | | | This is not necessary for ELF since .globl and .weak are mutually exclusive, but is necessary for Mach-O otherwise the symbol isn't visible externally. Differential Revision: https://reviews.llvm.org/D60245 llvm-svn: 357671
* ELF: Move SymtabSHNDX and getSectionIndex() to ObjFile. NFCI.Peter Collingbourne2019-04-042-11/+10
| | | | | | Differential Revision: https://reviews.llvm.org/D60244 llvm-svn: 357670
* Create RAII lock guard for global initialization lock.Eric Fiselier2019-04-041-81/+94
| | | | | | | | | | | | This patch is a part of a series of cleanups to cxa_guard.cpp. It should introduce no functionality change. This patch refactors the use of the global mutex and condvar into a RAII lock guard class. This improves correctness (since unlocks can't be forgotten). It also allows the unification of the non-threading and threading implementations. llvm-svn: 357669
* Always use is_initialized and set_initialized in cxa_guard.cppEric Fiselier2019-04-041-16/+8
| | | | | | | This patch is part of a series of cleanups to cxa_guard.cpp. It should have no functionality change. llvm-svn: 357668
* Revert r357452 - 'SimplifyCFG SinkCommonCodeFromPredecessors: Also sink ↵David L. Jones2019-04-049-128/+84
| | | | | | | | | | function calls without used results (PR41259)' This revision causes tests to fail under ASAN. Since the cause of the failures is not clear (could be ASAN, could be a Clang bug, could be a bug in this revision), the safest course of action seems to be to revert while investigating. llvm-svn: 357667
* gn build: Merge r357663Nico Weber2019-04-043-0/+3
| | | | llvm-svn: 357666
* [WebAssembly] EmscriptenEHSjLj: Don't abort if __THREW__ is definedSam Clegg2019-04-041-4/+5
| | | | | | | | | | | | | | | | | This allows __THREW__ to be defined in the current module, although it is still required to be a GlobalVariable. In emscripten we want to be able to compile the source code that defines this symbols. Previously we were avoid this by not running this pass when building that compiler-rt library, but I have change out to build it using the normal compiler path: https://github.com/emscripten-core/emscripten/pull/8391 Differential Revision: https://reviews.llvm.org/D60232 llvm-svn: 357665
* [NFC][TSan][libdispatch] Better CMake variable namesJulian Lettner2019-04-044-8/+8
| | | | llvm-svn: 357664
* [XCOFF] Add functionality for parsing AIX XCOFF object file headersHubert Tong2019-04-0421-0/+565
| | | | | | | | | | | | | | | | | | | | | Summary: 1. Add functionality for parsing AIX XCOFF object files headers. 2. Only support 32-bit AIX XCOFF object files in this patch. 3. Print out the AIX XCOFF object file header in YAML format. Reviewers: sfertile, hubert.reinterpretcast, jasonliu, mstorsjo, zturner, rnk Reviewed By: sfertile, hubert.reinterpretcast Subscribers: jsji, mgorny, hiraditya, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59419 Patch by Digger Lin llvm-svn: 357663
* [Support] On AIX, Check ENOTSUP on posix_fallocate instead of EOPNOTSUPPHubert Tong2019-04-041-1/+6
| | | | | | | | | | | | | | | | | | | | Summary: `posix_fallocate` can fail if the underlying filesystem does not support it; and, on AIX, such a failure is reported by a return value of `ENOTSUP`. The existing code checks only for `EOPNOTSUPP`, which may share the same value as `ENOTSUP`, but is not required to. Reviewers: xingxue, sfertile, jasonliu Reviewed By: xingxue Subscribers: kristina, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60175 llvm-svn: 357662
* [AIX] SelectionDAGNodes.h: Pack bit-fields that are meant to be packedHubert Tong2019-04-041-0/+14
| | | | | | | | | | | | | | | | | | | | | | | Summary: Certain classes in the subject file are expected to provide different views of a two-byte field as a collection of various bit-fields. On AIX, the canonical layout of bit-fields would cause these classes to span four bytes. Applying the `pack` pragma for compilers that employ the AIX canonical layout allows these classes to fit within the expected two bytes. In the future, the pragma would also likely need to be applied when building with Clang on AIX. Reviewers: xingxue, sfertile, jasonliu Reviewed By: xingxue Subscribers: jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60164 llvm-svn: 357661
* [gn] Use "$link /lib" for archives instead of lib.exeReid Kleckner2019-04-041-1/+1
| | | | | | | | | | | | | | | | Summary: This avoids the need to talk about lib.exe or llvm-lib.exe and it does the right thing with LLD. Reviewers: thakis Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60155 llvm-svn: 357660
* [X86] Remove CustomInserters for RDPKRU/WRPKRU. Use some custom lowering and ↵Craig Topper2019-04-045-54/+39
| | | | | | | | | | | | | | new ISD opcodes instead. These inserters inserted some instructions to zero some registers and copied from virtual registers to physical registers. This change instead inserts the zeros directly into the DAG at lowering time using new ISD opcodes that take the extra zeroes as inputs. The zeros will then go through isel on their own to select the MOV32r0 pseudo. Then we just need to mention the physical registers directly in the isel patterns and the isel table and InstrEmitter will take care of inserting the necessary copies to/from physical registers. llvm-svn: 357659
* [codeview] Remove Type member from CVRecordReid Kleckner2019-04-0423-100/+77
| | | | | | | | | | | | | | | | | Summary: Now CVType and CVSymbol are effectively type-safe wrappers around ArrayRef<uint8_t>. Make the kind() accessor load it from the RecordPrefix, which is the same for types and symbols. Reviewers: zturner, aganea Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60018 llvm-svn: 357658
* [TSan][libdispatch] Add Cmake option for libdispatch install pathJulian Lettner2019-04-041-12/+5
| | | | llvm-svn: 357657
* Fix minor innaccuracy in previous comment on ManagedStaticBaseReid Kleckner2019-04-041-2/+2
| | | | llvm-svn: 357656
* Make ManagedStatic constexpr constructibleReid Kleckner2019-04-041-3/+8
| | | | | | | Apparently it needs member initializers so that it can be constructed in a constexpr context. I explained my investigation of this in PR41367. llvm-svn: 357655
* Make clangd-fuzzer use the normal add_llvm_fuzzer() machineryNico Weber2019-04-044-9/+24
| | | | | | | | | This allows building it even if no fuzzer is enabled. (Sadly, it only builds on Linux at the moment.) Differential Revision: https://reviews.llvm.org/D60201 llvm-svn: 357654
* llvm-undname: Name a pair. No behavior change.Nico Weber2019-04-031-3/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D60210 llvm-svn: 357653
* [X86] Remove CustomInserter pseudos for MONITOR/MONITORX/CLZERO. Use custom ↵Craig Topper2019-04-039-97/+88
| | | | | | | | | | | | | | | | | | | | | | instruction selection instead. This custom inserter existed so we could do a weird thing where we pretended that the instructions support a full address mode instead of taking a pointer in EAX/RAX. I think was largely so we could be pointer size agnostic in the isel pattern. To make this work we would then put the address into an LEA into EAX/RAX in front of the instruction after isel. But the LEA is overkill when we just have a base pointer. So we end up using the LEA as a slower MOV instruction. With this change we now just do custom selection during isel instead and just assign the incoming address of the intrinsic into EAX/RAX based on its size. After the intrinsic is selected, we can let isel take care of selecting an LEA or other operation to do any address computation needed in this basic block. I've also split the instruction into a 32-bit mode version and a 64-bit mode version so the implicit use is properly sized based on the pointer. Without this we get comments in the assembly output about killing eax and defing rax or vice versa depending on whether we define the instruction to use EAX/RAX. llvm-svn: 357652
* [X86] Remove dead CHECK lines for a test. NFCCraig Topper2019-04-031-217/+0
| | | | llvm-svn: 357651
* [X86] Autogenerate checks. NFCCraig Topper2019-04-031-19/+31
| | | | llvm-svn: 357650
* llvm-undname: Fix a crash-on-invalidNico Weber2019-04-032-1/+6
| | | | | | | | Found by oss-fuzz, fixes issue 13260 on oss-fuzz. Differential Revision: https://reviews.llvm.org/D60207 llvm-svn: 357649
* llvm-undame: Fix an assert-on-invalidNico Weber2019-04-032-1/+9
| | | | | | | | Found by oss-fuzz, fixes issue 12432 on os-fuzz. Differential Revision: https://reviews.llvm.org/D60206 llvm-svn: 357648
* llvm-undname: Fix an assert-on-invalidNico Weber2019-04-032-0/+10
| | | | | | | | Found by oss-fuzz, fixes issues 12428 and 12429 on oss-fuzz. Differential Revision: https://reviews.llvm.org/D60204 llvm-svn: 357647
* llvm-undname: Fix a crash-on-invalidNico Weber2019-04-032-1/+10
| | | | | | | | Found by oss-fuzz, fixes issues 12435 and 12438 on oss-fuzz. Differential Revision: https://reviews.llvm.org/D60202 llvm-svn: 357646
* llvm-cxxfilt: Demangle gcc "old-style unified" ctors and dtorsNico Weber2019-04-033-14/+26
| | | | | | | | | | | These are variant 4, cf https://github.com/gcc-mirror/gcc/blob/master/gcc/cp/mangle.c#L1851 https://github.com/gcc-mirror/gcc/blob/master/gcc/cp/mangle.c#L1880 and gcc seems to sometimes emit them still. Differential Revision: https://reviews.llvm.org/D60229 llvm-svn: 357645
* [x86] fold shuffles of h-ops that have an undef operandSanjay Patel2019-04-032-3/+2
| | | | | | | If an operand is undef, we can assume it's the same as the other operand. llvm-svn: 357644
* add periodsAmy Huang2019-04-031-6/+6
| | | | llvm-svn: 357643
* [x86] eliminate movddup of horizontal opSanjay Patel2019-04-032-6/+11
| | | | | | | | | | | | This pattern would show up as a regression if we more aggressively convert vector FP ops to scalar ops. There's still a missed optimization for the v4f64 legal case (AVX) because we create that h-op with an undef operand. We should probably just duplicate the operands for that pattern to avoid trouble. llvm-svn: 357642
* Un-xfail one of the TestMiniDumpUUID tests on WindowsStella Stamenova2019-04-031-1/+0
| | | | | | The test is passing on Windows and the windows bot is failing because of the unexpected pass llvm-svn: 357641
* [libunwind] Export the unw_* symbols as weak symbolsPetr Hosek2019-04-0312-275/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libunwind defines the _Unwind_* ABI used by libc++abi. This ABI is a stable quasi-standard common between multiple implementations such as LLVM and GNU. The _U* symbol name space is also safely within the symbol name space that standard C & C++ reserve for the implementation. Futhermore, libunwind also defines several unw_* symbols, and references these from the _Unwind_* entry points so the standard/reserved part of the ABI is dependent on the unw_* part of the ABI. This is not OK for a C or C++ implementation. The unw_* symbols are reserved for C and extern "C" used by application code. This change renames each unw_* function to __unw* and adds a weak alias unw_* to keep the public <libunwind.h> ABI unchanged for backwards compatibility. Every reference to unw_* in the implementation has been changed to use __unw* so that if other unw_* definitions are in force because nothing uses <libunwind.h> in a particular program, no _Unwind* code path depends on any unw_* symbol. Furthemore, __unw_* symbols are hidden, which saves PLT overhead in the shared library case. In the future, we should cconsider untangling the unw_* API/ABI from the _Unwind_* API/ABI. The internal API backing the _Unwind_* ABI implementation should not rely on any nonstandard symbols not in the implementation-reserved name space. This would then allow separating the _Unwind_* API/ABI from unw_* entirely, but that's a more substantial change that's going to require more significant refactoring. Differential Revision: https://reviews.llvm.org/D59921 llvm-svn: 357640
* [Reproducers] Capture return values of functions returning by ptr/refJonas Devlieghere2019-04-0364-93/+203
| | | | | | | | | | | | | | | For some reason I had convinced myself that functions returning by pointer or reference do not require recording their result. However, after further considering I don't see how that could work, at least not with the current implementation. Interestingly enough, the reproducer instrumentation already (mostly) accounts for this, though the lldb-instr tool did not. This patch adds the missing macros and updates the lldb-instr tool. Differential revision: https://reviews.llvm.org/D60178 llvm-svn: 357639
* [IR] Create new method in `Function` class (NFC)Evandro Menezes2019-04-0318-27/+25
| | | | | | | | | Create method `optForNone()` testing for the function level equivalent of `-O0` and refactor appropriately. Differential revision: https://reviews.llvm.org/D59852 llvm-svn: 357638
* Cleanup test failures in no discard tests.Eric Fiselier2019-04-032-0/+26
| | | | llvm-svn: 357637
* [x86] add another test for disguised h-op; NFCSanjay Patel2019-04-031-0/+38
| | | | llvm-svn: 357636
* [libc++abi] Do not share an object library to create the static/shared librariesPetr Hosek2019-04-031-59/+39
| | | | | | | | | | | | | This change is similar to r356150, with the same motivation. The only difference is that the method used to merge libunwind.a and libc++abi.a had to be changed to use the same approach as libc++ since we no longer produce object libraries that could be linked together as we did before. We reuse the libc++ script for merging archives to avoid duplication between the two projects. Differential Revision: https://reviews.llvm.org/D60173 llvm-svn: 357635
* AMDGPU: Split block for si_end_cfMatt Arsenault2019-04-037-73/+227
| | | | | | | | | | | | | | | Relying on no spill or other code being inserted before this was precarious. It relied on code diligently checking isBasicBlockPrologue which is likely to be forgotten. Ideally this could be done earlier, but this doesn't work because of phis. Any other instruction can't be placed before them, so we have to accept the position being incorrect during SSA. This avoids regressions in the fast register allocator rewrite from inverting the direction. llvm-svn: 357634
* Re-enable most lldb-vscode tests on Linux.Jorge Gorbe Moya2019-04-034-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After https://reviews.llvm.org/D59828 and https://reviews.llvm.org/D59849, I believe the problems with these tests hanging have been solved. I tried enabling all of them on my machine, and got two failures: - One of them was spawning a child process that lives for 5 seconds, waited for 5 seconds to attach to the child, and failed because the child wasn't there. - The other one was a legit failure because shell expansion of arguments doesn't work on Linux. This tests enables all lldb-vscode tests on Linux except for "launch process with shell expansion of args" (which doesn't work), and fixes the other broken test by reducing the time it waits before attaching to its child process. Reviewers: zturner, clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60153 llvm-svn: 357633
* Attempt to upgrade compiler used by appveyor buildsEric Fiselier2019-04-031-1/+1
| | | | llvm-svn: 357632
* disable appveyor config for MSVC 2015Eric Fiselier2019-04-031-5/+6
| | | | llvm-svn: 357631
* [x86] add test for disguised horizontal op; NFCSanjay Patel2019-04-031-0/+48
| | | | llvm-svn: 357630
* [OPENMP]Add codegen for reduction vars with allocate clause, NFC.Alexey Bataev2019-04-031-3/+15
| | | | | | Added test for the reduction variables with the allocate clause. llvm-svn: 357629
* [dwarfdump] Remove bogus verifier errorJonas Devlieghere2019-04-032-18/+1
| | | | | | | | The standard doesn't require a DW_TAG_variable, DW_TAG_formal_parameter or DW_TAG_constant to A DW_AT_type attribute describing the type of the variable. It only specifies that it *can* have one. llvm-svn: 357628
* [ProfileSummary] Count callsite samples when computing total samples.Taewook Oh2019-04-036-7/+29
| | | | | | | | | | | | | | Summary: Currently ProfileSummaryBuilder doesn't count into callsite samples when computing total samples. Considering that ProfileSummaryInfo is used to checked the hotness of not only body samples but also callsite samples (from SampleProfileLoader), I think the callsite sample counts should be considered when computing total samples. Reviewers: eraman, danielcdh, wmi Subscribers: hiraditya, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59835 llvm-svn: 357627
* Fix and simplify PrepareCommandsForSourcingAdrian McCarthy2019-04-031-75/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spotted some problems in the Driver's PrepareCommandsForSourcing while helping a colleague track another problem. 1. One error case was not handled because there was no else clause. Fixed by switching to llvm's early-out style instead of nested `if (succes) { } else { }` cases. This keeps error handling close to the actual error. 2. One call-site failed to call the clean-up function. I solved this by simplifying the API. PrepareCommandsForSourcing no longer requires the caller to provide a buffer for the pipe's file descriptors and to call a separate clean-up function later. PrepareCommandsForSourcing now ensures the file descriptors are handled before returning. (The read end of the pipe is held open by the returned FILE * as before.) I also eliminated an unnecessary local, shorted the lifetime of another, and tried to improve the comments. I wrapped the call to open the pipe to get the `#ifdef`s out of the mainline. I replaced the `close`/`_close` calls with a platform-neutral helper from `llvm::sys` for the same reason. Per discussion on the review, I'm leaving the `fdopen` call to use the spelling that Windows has officially deprecated because it still works it avoids more `#ifdef`s. Differential Revision: https://reviews.llvm.org/D60152 llvm-svn: 357626
* [OPENMP]Add codegen for lastprivate vars with allocate clause, NFC.Alexey Bataev2019-04-031-11/+25
| | | | | | Added test for the lastprivatized variables with the allocate clause. llvm-svn: 357625
* gn build: Add build file for dexpNico Weber2019-04-032-2/+14
| | | | | | | | | None of check-clang-tools's tests run this, but the CMake check-clang-tools depends on the binary, so add it for consistency. Differential Revision: https://reviews.llvm.org/D60222 llvm-svn: 357624
* AMDGPU/NFC: Add offset field to arg metadata (required for code object v3)Konstantin Zhuravlyov2019-04-031-0/+4
| | | | llvm-svn: 357623
* [OpenMP][Stats] Fix stats gathering for distribute and team clauseJonathan Peyton2019-04-036-32/+107
| | | | | | | | | | | The distribute clause needs an explicit push of a timer. The teams clause needs a timer added and also, similarly to parallel, exchanged with the serial timer when encountered so that serial regions are counted properly. Differential Revision: https://reviews.llvm.org/D59801 llvm-svn: 357621
OpenPOWER on IntegriCloud