summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Use a MOVSX instruction instead of a MOVZX instruction in isel for an ↵Craig Topper2018-11-102-152/+87
| | | | | | | | any_extend of the remainder from an 8-bit sdivrem. The sdivrem will emit its own MOVSX to move %ah to the low byte of a register. By using a MOVSX for an any_extend this allows a post-isel peephole to merge them. llvm-svn: 346581
* [X86] Add a test case to show scalarized vector srem to demonstrate ↵Craig Topper2018-11-101-0/+415
| | | | | | | | unnecessary instructions. NFC After the division %ah is being sign extended to move it to lower byte of a register while avoiding a partial register read. We then zero extend the low byte to the full 32 bit register. But we don't use any of the zero extended bits. In the DAG the zero extend was really an any_extend so the sign extend should have been enough. llvm-svn: 346580
* Correct atexit(3) support in MSan/NetBSDKamil Rytarowski2018-11-101-3/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The NetBSD specific implementation of cxa_atexit() does not preserve the 2nd argument if dso is equal to NULL. Changes: - Split paths of handling intercepted __cxa_atexit() and atexit(3). This affects all supported Operating Systems. - Add a local stack-like structure to hold the __cxa_atexit() context. atexit(3) is documented in the C standard as calling callback from the earliest to the oldest entry. This path also fixes potential ABI problem of passing an argument to a function from the atexit(3) callback mechanism. - Allow usage of global vars with ctors in interceptors. This allows to use Vector without automatic cleaning up the structures. This code has been modeled after TSan implementation for the same functions. Sponsored by <The NetBSD Foundation> Reviewers: joerg, dvyukov, eugenis, vitalybuka, kcc Reviewed By: vitalybuka Subscribers: delcypher, devnexen, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40714 llvm-svn: 346579
* [PDB] Simplify some ghash code, NFCReid Kleckner2018-11-101-17/+21
| | | | | | | Instead of calling the same function twice with different parameters, make the parameters depend on the condition. llvm-svn: 346578
* Fix DragonFlyBSD buildDavid Carlier2018-11-101-1/+3
| | | | | | | | | | Reviewers: rnk, thakis Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D54363 llvm-svn: 346577
* RegAllocFast: Further cleanups; NFCMatthias Braun2018-11-101-210/+217
| | | | llvm-svn: 346576
* test/CodeGen/X86: Relax test caseMatthias Braun2018-11-101-6/+4
| | | | | | | No need to hardcode register or expecting totally unnecessary spills from the allocator. llvm-svn: 346575
* [X86] In LowerHorizontalByteSum, emit vector_shuffle nodes instead of ↵Craig Topper2018-11-103-8/+8
| | | | | | | | | | directly using X86ISD::UNPCKL/X86ISD::UNPCKH. This gives shuffle lowering the freedom to use zero_extend_vector_inreg for the unpckl shuffle. Shuffle combining usually makes this swap later, but not when AVX512 is enabled it seems. While there also use DAG.getConstant to create a 0 vector instead of using the helper the forces a specific BUILD_VECTOR. I don't think that helper is usually needed. We're basically free to create a constant build_vector anytime and it will be legalized on its own. llvm-svn: 346574
* Unbreak the linux bot from the previous commit. Fred needed to useJason Molenda2018-11-101-0/+6
| | | | | | | | | some of the macros from mach/exc_resource.h to decode EXC_RESOURCE, but that header doesn't exist on non-apple platforms and StopInfoMachException.cpp needs to build on those systems. EXC_RESOURCE won't be decoded when lldb is built on non-darwin systems. llvm-svn: 346573
* Add extra diagnostics to testAdrian Prantl2018-11-101-0/+4
| | | | llvm-svn: 346572
* Enable listening for EXC_RESOURCE events, and format machJason Molenda2018-11-102-19/+81
| | | | | | | | | | | | | | | | | | | | event as a thread stop reason if we receive one, using some macros to decode the payload. Patch originally written by Fred Riss, with a few small changes by myself. Writing a test for this is a little tricky because the mach exception data interpretation relies on header macros or function calls - it may change over time and writing a gdb_remote_client test for this would break as older encoding interpretation is changed. I'll tak with Fred about this more, but neither of us has been thrilled with the kind of tests we could write for it. <rdar://problem/13097323>, <rdar://problem/40144456> llvm-svn: 346571
* [WebAssembly] Update bleeding-edge cpu featuresThomas Lively2018-11-101-1/+2
| | | | | | | | | | Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D54362 llvm-svn: 346570
* [GC] Simplify linking of GC builtin GC strategiesPhilip Reames2018-11-093-27/+5
| | | | llvm-svn: 346569
* [ARM64] [Windows] Handle funcletsEli Friedman2018-11-0913-20/+600
| | | | | | | | | | | | This patch adds support for funclets in frame lowering and ISel lowering. Together with D50288 and D50166, it enables C++ exception handling. Patch by Sanjin Sijaric, with some fixes by me. Differential Revision: https://reviews.llvm.org/D51524 llvm-svn: 346568
* [libcxx] Provide thread annotations for shared_mutexPetr Hosek2018-11-091-7/+8
| | | | | | | | | | shared_mutex was introduced in C++17 but its implementation currently doesn't use Clang's thread annotations like regular mutex. This change adds those. Differential Revision: https://reviews.llvm.org/D54290 llvm-svn: 346567
* Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when ↵Yan Zhang2018-11-092-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | message target is a result of a C-style method. Summary: The issue is that for array subscript like: ``` arr[[Foo() bar]]; ``` ClangFormat will recognize it as C++11 attribute syntax and put a space between 'arr' and first '[', like: ``` arr [[Foo() bar]]; ``` Now it is fixed. Tested with: ``` ninja FormatTests ``` Reviewers: benhamilton Reviewed By: benhamilton Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D54288 llvm-svn: 346566
* [AVR] Reorder the CHECK lines in directmem.ll to match current trunkDylan McKay2018-11-091-14/+19
| | | | | | | | | | | In r346432 ("[DAGCombine] Improve alias analysis for chain of independent stores"), the order of ldi/sts blocks changed. The new IR is equivalent to the old IR. This patch updates the test to fix the test suite. llvm-svn: 346565
* [SelectionDAG] Fix a -Wparentheses warning from gcc in an assert. NFCCraig Topper2018-11-091-2/+2
| | | | | | gcc wants parentheses around the logical OR since there is a logical AND for the string. llvm-svn: 346564
* [ARM] Add MemOperand to LDRcp to enable DCE.Eli Friedman2018-11-092-1/+62
| | | | | | | | | | | | LDRcp should be deleted when the dest register is dead in register coalescing. Without MemOp, dead LDRcp will cause dead constant pool value which references to non-existing label. Patch by Yin Ma. Differential Revision: https://reviews.llvm.org/D54173 llvm-svn: 346563
* [JumpThreading] Fix exponential time algorithm computing known values.Eli Friedman2018-11-093-34/+90
| | | | | | | | | | | | | | | | | | | ComputeValueKnownInPredecessors has a "visited" set to prevent infinite loops, since a value can be visited more than once. However, the implementation didn't prevent the algorithm from taking exponential time. Instead of removing elements from the RecursionSet one at a time, we should keep around the whole set until ComputeValueKnownInPredecessors finishes, then discard it. The testcase is synthetic because I was having trouble effectively reducing the original. But it's basically the same idea. Instead of failing, we could theoretically cache the result instead. But I don't think it would help substantially in practice. Differential Revision: https://reviews.llvm.org/D54239 llvm-svn: 346562
* Work with a gdb-remote target that doesn't handle theJason Molenda2018-11-093-2/+77
| | | | | | | | | | | | | | | | | | | | | | | | | qWatchpointSupportInfo packet correctly. In GDBRemoteCommunicationClient::GetWatchpointSupportInfo, if the response to qWatchpointSupportInfo does not include the 'num' field, then we did not get an answer we understood, mark this target as not supporting that packet. In Target.cpp, rename the very confusingly named CheckIfWatchpointsExhausted to CheckIfWatchpointsSupported, and check the error status returned by Process::GetWatchpointSupportInfo. If we cannot determine what the number of supported watchpoints are, assume that they will work. We'll handle the failure later when we try to create/enable the watchpoint if the Z2 packet isn't supported. Add a gdb_remote_client test case. <rdar://problem/42621432> llvm-svn: 346561
* Re-land r343606 "[winasan] Unpoison the stack in NtTerminateThread"Reid Kleckner2018-11-092-1/+12
| | | | | | | | | This change was reverted because it caused some nacl tests in chromium to fail. I attempted to reproduce those problems locally, but I was unable to. Let's reland this and let Chromium's test infrastructure discover any problems. llvm-svn: 346560
* Revert "Exclude wasm target from Windows packaging due to PR39448"Thomas Lively2018-11-091-2/+2
| | | | | | | | | | | | | | Summary: This reverts r346122 now that the failing tests have been disabled. Depends on D54353. Reviewers: aheejin, dschuff Subscribers: fedor.sergeev, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54354 llvm-svn: 346559
* [WebAssembly] Disable custom NaN payload testsThomas Lively2018-11-091-15/+19
| | | | | | | | | | | | | | | | | Summary: These tests fail on 32-bit builds because NaN payload bits in floating point immediates are not necessarily preserved through compilation. This is because the MC layer uses native doubles to store these values. The tests will be reenabled once this problem has been fixed or deleted if we decide we don't care about lowering payload bits. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54353 llvm-svn: 346558
* [hwasan] Add entire report to abort message on Android.Evgeniy Stepanov2018-11-096-9/+82
| | | | | | | | | | | | | | Summary: When reporting a fatal error, collect and add the entire report text to android_set_abort_message so that it can be found in the tombstone. Reviewers: kcc, vitalybuka Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D54284 llvm-svn: 346557
* Revert "Revert rL346454: Fix a use-after-free introduced by r344915."Adrian Prantl2018-11-092-1/+11
| | | | | | This un-reverts commit 346454 with a relaxed CHECK for Windows. llvm-svn: 346556
* [clang-tidy] fix PR39583 - ignoring ParenCast for string-literals in ↵Jonas Toth2018-11-092-4/+9
| | | | | | | | | | | | | | | | | | | pro-bounds-array-to-pointer-decay Summary: The fix to the issue that `const char* p = ("foo")` is diagnosed as decay is to ignored the ParenCast. Resolves PR39583 Reviewers: aaron.ballman, alexfh, hokein Reviewed By: aaron.ballman Subscribers: nemanjai, xazax.hun, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D54281 llvm-svn: 346555
* [ASTMatchers] overload ignoringParens for ExprJonas Toth2018-11-094-3/+39
| | | | | | | | | | | | | | | | Summary: This patch allows fixing PR39583. Reviewers: aaron.ballman, sbenza, klimek Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D54307 llvm-svn: 346554
* Remove llvm include from debugserver, change Jason Molenda2018-11-092-5/+3
| | | | | | | | LLVM_FALLTHROUGH's to [[clang::fallthrough]] - debugserver is only ever compiled on darwin systems with clang. llvm-svn: 346553
* [X86] Move the promotion of v16i16->v16i8 for avx512f but not avx512bw from ↵Craig Topper2018-11-0914-146/+156
| | | | | | | | | | lowering to isel. Change to use vpmovzx instead of vpmovsx. With avx512f but not avx512bw we need to extend to v16i32 then truncate that to to v16i8. Previously we emitted both nodes during lowering, but I'm trying to switch to using target independent nodes and with that switched the extend+truncate wou This patch changes the implementation to what will be necessary with that patch which helps minimize test diffs. llvm-svn: 346552
* [OPENMP][NVPTX]Extend number of constructs executed in SPMD mode.Alexey Bataev2018-11-098-57/+88
| | | | | | | | | If the statements between target|teams|distribute directives does not require execution in master thread, like constant expressions, null statements, simple declarations, etc., such construct can be xecuted in SPMD mode. llvm-svn: 346551
* Branch/tag all projects with a single commit in release-tagging script.James Y Knight2018-11-091-15/+31
| | | | | | | | | | | | | | | This change updates the release script to use svnmucc to create all the branches with one commit. This will ensure that the git tag won't bounce around if the git migration runs in-between separate commits creating a branch. Additionally, update the list of projects to include all of the projects in the monorepo, plus test-suite. Differential Revision: https://reviews.llvm.org/D53467 llvm-svn: 346550
* Revert rL346454: Fix a use-after-free introduced by r344915.Simon Pilgrim2018-11-092-11/+1
| | | | | | | | | | | | | | r344915 added a call to ApplyDebugLocation to the sanitizer check function emitter. Some of the sanitizers are emitted in the function epilogue though and the LexicalScopeStack is emptied out before. By detecting this situation and early-exiting from ApplyDebugLocation the fallback location is used, which is equivalent to the return location. rdar://problem/45859802 ........ Causes EXPENSIVE_CHECKS build bot failures: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win llvm-svn: 346549
* Use the correct address space when bitcasting func pointer to int pointerDylan McKay2018-11-091-1/+5
| | | | | | | | | | | | | | | | | | | | When we cast a function pointer to an int pointer, at some pointer later it gets bitcasted back to a function and called. In backends that have a nonzero program memory address space specified in the data layout, the old code would lose the address space data. When LLVM later attempted to generate the bitcast from i8* to i8(..)* addrspace(1), it would fail because the pointers are not in the same address space. With this patch, the address space of the function will carry on to the address space of the i8* pointer. This is because all function pointers in Harvard architectures need to be assigned to the correct address space. This has no effect to any in-tree backends except AVR. llvm-svn: 346548
* Allow a double-underscore spelling of Clang attributes using double square ↵Aaron Ballman2018-11-093-7/+25
| | | | | | | | | | bracket syntax. This matches a similar behavior with GCC accepting [[gnu::__attr__]] as a alias for [[gnu::attr]] in that clang attributes can now be spelled with two leading and trailing underscores. I had always intended for this to work, but missed the critical bit. We already had an existing test in test/Preprocessor/has_attribute.cpp for [[clang::__fallthrough__]] but using that spelling would still give an "unknown attribute" diagnostic. llvm-svn: 346547
* [AArch64] Support HiSilicon's TSV110 processorBryan Chan2018-11-0914-4/+82
| | | | | | | | | | | | Reviewers: t.p.northover, SjoerdMeijer, kristof.beyls Reviewed By: kristof.beyls Subscribers: olista01, javed.absar, kristof.beyls, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D53908 llvm-svn: 346546
* [llvm-mca] Account for buffered resources when analyzing "Super" resources.Andrea Di Biagio2018-11-091-1/+28
| | | | | | | | | | | | | | | | | | | | This was noticed when working on PR3946. By construction, a group cannot be used as a "Super" resource. That constraint is enforced by method `SubtargetEmitter::ExpandProcResource()`. A Super resource S can be part of a group G. However, method `SubtargetEmitter::ExpandProcResource()` would not update the number of consumed resource cycles in G based on S. In practice, this is perfectly fine because the resource usage is correctly computed for processor resource units. However, llvm-mca should still check if G is a buffered resource. Before this patch, llvm-mca didn't correctly check if S was part of a group that defines a buffer. So, the instruction descriptor was not correctly set. For now, the semantic change introduced by this patch doesn't affect any of the upstream scheduling models. However, it will allow to make some progress on PR3946. llvm-svn: 346545
* [MS demangler] Use a slightly shorter unmangling for mangled strings.Nico Weber2018-11-093-377/+376
| | | | | | | | | | Before: const wchar_t * {L"%"} Now: L"%" See also PR39593. Differential Revision: https://reviews.llvm.org/D54294 llvm-svn: 346544
* [Hexagon] Fix some -Wunused-function with LLVM_DUMP_METHOD and -Wunused-variableFangrui Song2018-11-092-4/+9
| | | | llvm-svn: 346543
* Fix a nondeterminism in the debug info for VLA size expressions.Adrian Prantl2018-11-094-8/+17
| | | | | | | | | | | The artificial variable describing the array size is supposed to be called "__vla_expr", but this was implemented by retrieving the name of the associated alloca, which isn't a reliable source for the name, since nonassert compilers may drop names from LLVM IR. rdar://problem/45924808 llvm-svn: 346542
* [SystemZ] Add a couple of missing testsUlrich Weigand2018-11-091-10/+55
| | | | | | | | | | | A few fp128 tests were omitted from test/CodeGen/SystemZ/fp-round-01.ll since in early days, LLVM couldn't handle implicitly generated library calls to functions with long double arguments on SystemZ. This deficiency was actually long since fixed, but those tests are still missing. This patch adds the missing tests. NFC. llvm-svn: 346541
* [DWARFv5] Emit normal type units in .debug_info comdats.Paul Robinson2018-11-095-39/+52
| | | | | | Differential Revision: https://reviews.llvm.org/D54282 llvm-svn: 346540
* [X86] Turn X86ISD::VSEXT into X86ISD::VZEXT if the upper bits aren't demanded.Craig Topper2018-11-0922-222/+235
| | | | | | | | This makes X86ISD::VSEXT more similar to ISD::SIGN_EXTEND and ISD::ZERO_EXTEND. I'm hoping to replace X86ISD::VSEXT/VZEXT with target independent nodes. Making the target specific nodes similar to the target independent nodes helps minimize test diffs in that patch. llvm-svn: 346539
* [CostModel][X86] SK_ExtractSubvector is free if the subvector is at the ↵Simon Pilgrim2018-11-0913-697/+751
| | | | | | start of the source vector llvm-svn: 346538
* [Hexagon] Fix unused variable warning in release buildsJordan Rupprecht2018-11-091-0/+1
| | | | llvm-svn: 346537
* [HIP] Remove useless sections in linked filesYaxun Liu2018-11-091-0/+4
| | | | | | | | | | | clang-offload-bundler creates __CLANG_OFFLOAD_BUNDLE__* sections in the bundles, which get into the linked files. These sections are useless after linking. They waste disk space and cause confusion for clang when directly linked with other object files, therefore should be removed. Differential Revision: https://reviews.llvm.org/D54275 llvm-svn: 346536
* [WebAssembly] Hotfix of WebAssemblyInstructionTableSize after rL346465Fangrui Song2018-11-091-0/+2
| | | | llvm-svn: 346535
* [TTI] Flip vector types in getShuffleCost SK_ExtractSubvector callSimon Pilgrim2018-11-091-1/+1
| | | | | | | | For SK_ExtractSubvector, the default 'Ty' type is the source operand type and 'SubTy' is the destination subvector type I got this the wrong way around when I added rL346510 llvm-svn: 346534
* [AMDGPU] Cleanup optimize-if-exec-masking.mir test. NFC.Stanislav Mekhanoshin2018-11-091-272/+42
| | | | llvm-svn: 346533
* [Hexagon] Implement noreturn optimizationBrendon Cahoon2018-11-095-1/+133
| | | | | | | | | | | Eliminate the stack frame in functions with the noreturn nounwind attributes, and when the noreturn-stack-elim target feature is enabled. This reduces the code and stack space needed for noreturn functions. Differential Revision: https://reviews.llvm.org/D54210 llvm-svn: 346532
OpenPOWER on IntegriCloud