summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [MS] Increase default new alignment for win64 and test itReid Kleckner2017-11-213-4/+22
| | | | | | | | | | | | | | | | | | Summary: This raises __STDCPP_DEFAULT_NEW_ALIGNMENT__ from 8 to 16 on Win64. This matches platforms that follow the usual `2 * sizeof(void*)` alignment requirement for malloc. We might want to consider making that the default rather than relying on long double alignment. Fixes PR35356 Reviewers: STL_MSFT, rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D40277 llvm-svn: 318723
* Re-revert "Refactor debuginfo-tests."Zachary Turner2017-11-2128-174/+29
| | | | | | | | | | This is still breaking greendragon. At this point I give up until someone can fix the greendragon bots, and I will probably abandon this effort in favor of using a private github repository. llvm-svn: 318722
* COFF: Emit a COFF symbol table if /debug:dwarf is specified.Peter Collingbourne2017-11-216-23/+566
| | | | | | | | | This effectively reverts r318548 and r318635 while keeping the functionality behind the flag and preserving the bug fix from r318548. Differential Revision: https://reviews.llvm.org/D40264 llvm-svn: 318721
* ASTMatchers{,Macros}.h: Add some extra macros to use for decl/def of matchersDavid Blaikie2017-11-213-10/+63
| | | | | | | Fix ODR violations caused by using internal linkage variables in non-internal inline functions. (also removes duplicate definitions, etc) llvm-svn: 318720
* FormatInternal.h: Add missing includes.David Blaikie2017-11-211-0/+4
| | | | llvm-svn: 318719
* Make some headers modular by adding missing includes/forward decls.David Blaikie2017-11-212-0/+3
| | | | llvm-svn: 318718
* [sanitizers] Add init function to set alignment of low level allocatorWalter Lee2017-11-213-1/+11
| | | | | | | | | ASan requires that the min alignment be at least the shadow granularity, so add an init function to do that. Differential Revision: https://reviews.llvm.org/D39473 llvm-svn: 318717
* [X86] Remove 'mm3now' from isValidFeatureName.Craig Topper2017-11-211-2/+0
| | | | | | The correct spelling is '3dnow' which is already in the list. llvm-svn: 318716
* xray-record-yaml.h: Remove unused fileDavid Blaikie2017-11-211-102/+0
| | | | llvm-svn: 318715
* llvm-rc/ResourceScriptTokenList.h: Turns this into a .def file to imply that ↵David Blaikie2017-11-215-16/+9
| | | | | | | | it's non-modular Also undef the macros at the end of the file to make it easier to use. llvm-svn: 318714
* XRayRecord.h: Add missing #includeDavid Blaikie2017-11-211-0/+1
| | | | llvm-svn: 318713
* YAML/XRay/std::vector: Fix ODR violation by removing local specializationDavid Blaikie2017-11-211-10/+0
| | | | | | | | There's a generic partial specialization for all std::vector<T> that does what's desired, so no need for this full specialization that's causing an ODR violation anyway. llvm-svn: 318712
* [SCCP] If we replace with a constant, we can't replace with a range.Davide Italiano2017-11-211-1/+3
| | | | | | This microoptimization is NFC. llvm-svn: 318711
* Revert r318678 to fix Clang testRichard Trieu2017-11-219-32/+36
| | | | | | r318678 caused the Clang test CodeGen/ms-inline-asm.c to start failing. llvm-svn: 318710
* [msan] Don't sanitize "nosanitize" instructionsVitaly Buka2017-11-203-18/+62
| | | | | | | | | | Reviewers: eugenis Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D40205 llvm-svn: 318708
* [tsan] Fix sigaction implementation when it's called only to get handlerVitaly Buka2017-11-202-28/+39
| | | | | | | | | | Reviewers: eugenis Subscribers: kubamracek, llvm-commits, krytarowski Differential Revision: https://reviews.llvm.org/D40272 llvm-svn: 318707
* [SelectionDAG] When promoting the result of a VSELECT, make sure we promote ↵Craig Topper2017-11-202-3/+16
| | | | | | | | | | | | the condition to the SetCC type for the final result type not the original type. Normally this would be cleaned up by promoting the condition operand next. But in the attached case we promoted the result from v2i48 to v2i64 and the condition from v2i1 to v2i48. Then we tried to "promote" the v2i48 condition back to v2i1 because that's what the SetCC result type for v2i64 is on X86 with VLX. But promote is either a NOP or SIGN_EXTEND and this would need a truncation. With the change here we now get the SetCC type of v2i1 when we're handling the result promotion and the operand no longer needs to be promoted itself. Fixes PR35272. llvm-svn: 318706
* [analyzer] Diagnose stack leaks via block capturesAlexander Shaposhnikov2017-11-203-99/+404
| | | | | | | | | | | This diff extends StackAddrEscapeChecker to catch stack addresses leaks via block captures if the block is executed asynchronously or returned from a function. Differential revision: https://reviews.llvm.org/D39438 llvm-svn: 318705
* [Sparc] efficient pattern for UINT_TO_FP conversionFedor Sergeev2017-11-204-30/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: while investigating performance degradation of imagick benchmark there were found inefficient pattern for UINT_TO_FP conversion. That pattern causes RAW hazard in assembly code. Specifically, uitofp IR operator results in poor assembler : st %i0, [%fp - 952] ldd [%fp - 952], %f0 it stores 32-bit integer register into memory location and then loads 64-bit floating point data from that location. That is exactly RAW hazard case. To optimize that case it is possible to use SPISD::ITOF and SPISD::XTOF for conversion from integer to floating point data type and to use ISD::BITCAST to copy from integer register into floating point register. The fix is to write custom UINT_TO_FP pattern using SPISD::ITOF, SPISD::XTOF, ISD::BITCAST. Patch by Alexey Lapshin Reviewers: fedor.sergeev, jyknight, dcederman, lero_chris Reviewed By: jyknight Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36875 llvm-svn: 318704
* Add ADL support to range based <algorithm> extensionsDavid Blaikie2017-11-202-41/+124
| | | | | | | | | | | | | | | | | This adds support for ADL in the range based <algorithm> extensions (llvm::for_each etc.). Also adds the helper functions llvm::adl::begin and llvm::adl::end which wrap std::begin and std::end with ADL support. Saw this was missing from a recent llvm weekly post about adding llvm::for_each and thought I might add it. Patch by Stephen Dollberg! Differential Revision: https://reviews.llvm.org/D40006 llvm-svn: 318703
* Revert 318668, which is associated with a broken patchErich Keane2017-11-202-2/+2
| | | | llvm-svn: 318702
* Relax pdb.test checks for debug chunk sizesReid Kleckner2017-11-201-2/+2
| | | | llvm-svn: 318700
* Merge .xdata into .rdata by defaultReid Kleckner2017-11-203-26/+30
| | | | | | | | | | | | Summary: MSVC does this. The user can override it with their own /merge: flag. Reviewers: ruiu, pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D40197 llvm-svn: 318699
* Revert r318669/318694Erich Keane2017-11-2023-152/+56
| | | | | | Broke some libclang tests, so reverting for now. llvm-svn: 318698
* Resubmit "Refactor debuginfo-tests" again.Zachary Turner2017-11-2028-29/+174
| | | | | | | | | | | | This was reverted due to the tests being run twice on some build bots. Each run had a slightly different configuration due to the way in which it was being invoked. This fixes the problem (albeit in a somewhat hacky way). Hopefully in the future we can get rid of the workflow of running debuginfo-tests as part of clang, and then this hack can go away. llvm-svn: 318697
* Fix a lld-x86_64-darwin13 build error.Hiroshi Yamauchi2017-11-201-2/+1
| | | | | | | | | | | | | | | | | | | Summary: Fix this build error http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/15112/steps/build_Lld/logs/stdio after https://reviews.llvm.org/rL318693 Reviewers: davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D40266 llvm-svn: 318696
* bpf: add a test case for trunc-op optimizationYonghong Song2017-11-201-0/+106
| | | | | | | | | | | | | | | | Commit b5cbc7760ab8 ("[bpf] allow direct and indirect calls") allowed more than one function in the bpf program, and commit 114353884415 ("bpf: fix a bug in trunc-op optimization") fixed a bug in trunc-op optimization which only showed up with more than one function in the bpf program. This patch added a test case for trunc-op optimization for bpf programs with two functions. Reverting commit "bpf: fix a bug in trunc-op optimization" will cause failure for this test case. Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 318695
* Include test files for rL318668Erich Keane2017-11-203-0/+53
| | | | | | Forgotten when doing my SVN commit. llvm-svn: 318694
* Add heuristics for irreducible loop metadata under PGOHiroshi Yamauchi2017-11-204-12/+112
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add the following heuristics for irreducible loop metadata: - When an irreducible loop header is missing the loop header weight metadata, give it the minimum weight seen among other headers. - Annotate indirectbr targets with the loop header weight metadata (as they are likely to become irreducible loop headers after indirectbr tail duplication.) These greatly improve the accuracy of the block frequency info of the Python interpreter loop (eg. from ~3-16x off down to ~40-55% off) and the Python performance (eg. unpack_sequence from ~50% slower to ~8% faster than GCC) due to better register allocation under PGO. Reviewers: davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39980 llvm-svn: 318693
* [OpenMP] Initial implementation of code generation for pragma 'teams ↵Carlo Bertolli2017-11-2015-18/+3526
| | | | | | | | | | distribute parallel for' on host https://reviews.llvm.org/D40187 This patch implements code gen for 'teams distribute parallel for' on the host, including all its clauses and related regression tests. llvm-svn: 318692
* [MIPS] Add test case to check calculation of GOT pages in case of using a ↵Simon Atanasyan2017-11-201-0/+65
| | | | | | linker script. NFC llvm-svn: 318691
* Fix std::string::data() symbol during library build.Eric Fiselier2017-11-201-1/+1
| | | | | | | | | | | | | | The non-const data() member of std::string is only exposed in C++17 and beyond. However std::string is externally instantiated and so the member function needs to be exposed to be externally instantiated. On Linux and OS X this shouldn't cause a problem, because _LIBCPP_INLINE_VISIBILITY ensures the symbol is always inlined. However on Windows, the symbol gets marked dllimport, but there is no definition to import, causing link errors. llvm-svn: 318690
* COFF: Correctly handle relocations against early discarded sections.Peter Collingbourne2017-11-204-3/+34
| | | | | | | | | | | Don't crash if we encounter a reference to an early discarded section (such as .drectve). Instead, handle them the same way as sections discarded by comdat merging, i.e. either print an error message or (for debug sections) silently ignore the relocation. Differential Revision: https://reviews.llvm.org/D40235 llvm-svn: 318689
* Add missing test.Rafael Espindola2017-11-201-0/+4
| | | | | | | | | | Without this we could remove SS->getFile<ELFT>()->IsUsed = true; from addUndefined and no test would fail. llvm-svn: 318688
* Fix spelling in comment. NFCI.Simon Pilgrim2017-11-201-1/+1
| | | | llvm-svn: 318687
* Revert "[SelectionDAG] Make sorting predicate stronger to remove ↵Mandeep Singh Grang2017-11-201-9/+4
| | | | | | | | | | non-deterministic ordering" This broke the bots. Reverting this until I can fix the failures. This reverts commit 5a3db2856d12a3c4b400f487d39f8f05989e79f0. llvm-svn: 318686
* [AArch64] Adjust the cost model for Exynos M1 and M2Evandro Menezes2017-11-201-2/+4
| | | | | | Fix the modeling of test and branch. llvm-svn: 318685
* Revert "Fix out-of-order stepping behavior in programs with sunk instructions."Paul Robinson2017-11-202-60/+0
| | | | | | | This reverts commit 30419e150cd940893a13b345e85f96053850208f. aka r318679. It caused "sanitizer-windows" bot to fail. llvm-svn: 318684
* COFF: Remove the SymbolBodies vector, and rename SparseSymbolBodies to Symbols.Peter Collingbourne2017-11-204-18/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D40237 llvm-svn: 318683
* COFF: Stop requiring comdat sections to have an external leader to ↵Peter Collingbourne2017-11-202-4/+20
| | | | | | | | | | | | | | participate in ICF. This requirement was added in r254578 to fix pr25686. However, it appears to have originated from a misdiagnosis of the problem: link.exe refused to merge the two sections because they are non-executable, not because they have internal leaders. If I set up a similar scenario with functions instead of globals I see that link.exe merges them. Differential Revision: https://reviews.llvm.org/D40236 llvm-svn: 318682
* [AutoComplete] Use stronger sort predicate for autocomplete candidates to ↵Mandeep Singh Grang2017-11-201-1/+5
| | | | | | | | | | | | | | | | | | remove non-deterministic ordering Summary: This fixes the failure in test/Driver/autocomplete.c uncovered by D39245. Reviewers: yamaguchi, teemperor, ruiu Reviewed By: yamaguchi, ruiu Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D40234 llvm-svn: 318681
* [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ↵Mandeep Singh Grang2017-11-201-4/+9
| | | | | | | | | | | | | | | | | | | | ordering Summary: This fixes failures in the following tests uncovered by D39245: LLVM :: CodeGen/ARM/ifcvt3.ll LLVM :: CodeGen/ARM/switch-minsize.ll LLVM :: CodeGen/X86/switch.ll Reviewers: hans, efriedma Reviewed By: hans Subscribers: fhahn, aemerson, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D39995 llvm-svn: 318680
* Fix out-of-order stepping behavior in programs with sunk instructions.Paul Robinson2017-11-202-0/+60
| | | | | | | | | | | | | | | | 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 is no longer consistent with the original source code. In order to ensure correct single-stepping and profiling, the debug location for sunk instructions is either merged with the insertion point or erased if the target successor block is empty. Patch by Matthew Voss! Differential Revision: https://reviews.llvm.org/D39933 llvm-svn: 318679
* [X86] Avoid unecessary opsize byte in segment move to memoryNirav Dave2017-11-209-36/+32
| | | | | | | | | | | | | | | | | Summary: Segment moves to memory are always 16-bit. Remove invalid 32 and 64 bit variants. Fixes PR34478. Reviewers: rnk, craig.topper Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D39847 llvm-svn: 318678
* [SROA] Correctly invalidate analyses when dead instructions deletedTeresa Johnson2017-11-203-3/+103
| | | | | | | | | | | | | | | Summary: SROA can fail in rewriting alloca but still rewrite a phi resulting in dead instruction elimination. The Changed flag was not being set correctly, resulting in downstream passes using stale analyses. The included test case will assert during the second BDCE pass as a result. Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39921 llvm-svn: 318677
* Try to fix syntax for !NetBSD in TSAN_INTERCEPTORsKamil Rytarowski2017-11-201-2/+2
| | | | llvm-svn: 318676
* [AMDGPU][MC][GFX8][GFX9] Corrected names of integer ↵Dmitry Preobrazhensky2017-11-2063-506/+611
| | | | | | | | | | | | v_{add/addc/sub/subrev/subb/subbrev} See bug 34765: https://bugs.llvm.org//show_bug.cgi?id=34765 Reviewers: tamazov, SamWot, arsenm, vpykhtin Differential Revision: https://reviews.llvm.org/D40088 llvm-svn: 318675
* Handle NetBSD specific indirection of libpthread functionsKamil Rytarowski2017-11-202-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Correct handling of libpthread(3) functions in TSan/NetBSD: - pthread_cond_init(3), - pthread_cond_signal(3), - pthread_cond_broadcast(3), - pthread_cond_wait(3), - pthread_cond_destroy(3), - pthread_mutex_init(3), - pthread_mutex_destroy(3), - pthread_mutex_trylock(3), - pthread_rwlock_init(3), - pthread_rwlock_destroy(3), - pthread_rwlock_rdlock(3), - pthread_rwlock_tryrdlock(3), - pthread_rwlock_wrlock(3), - pthread_rwlock_trywrlock(3), - pthread_rwlock_unlock(3), - pthread_once(3). Code out of the libpthread(3) context uses the libc symbols that are prefixed with __libc_, for example: __libc_cond_init. This caused that these functions were invisible to sanitizers on NetBSD. Intercept the libc-specific ones and add them as NetBSD-specific aliases for the common pthread(3) ones. NetBSD needs to intercept both functions, as the regularly named ones are used internally in libpthread(3). Sponsored by <The NetBSD Foundation> Reviewers: joerg, dvyukov, vitalybuka Reviewed By: dvyukov Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40243 llvm-svn: 318673
* [Docs] Regenerate the command line option reference.Craig Topper2017-11-201-5/+45
| | | | llvm-svn: 318672
* Add DemangleFunctionName for backtracing on NetBSDKamil Rytarowski2017-11-201-2/+79
| | | | | | | | | | | | | | | | | | | | | Summary: NetBSD uses indirection for old threading functions for historical reasons The mangled names are internal implementation detail and should not be exposed even in backtraces. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, dvyukov Reviewed By: dvyukov Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40251 llvm-svn: 318671
OpenPOWER on IntegriCloud