summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [coroutines] Fix spills of static array allocasGor Nishanov2019-05-132-6/+111
| | | | | | | | | | | | | | | | | | | | | | | Summary: CoroFrame was not considering static array allocas, and was only ever reserving a single element in the coroutine frame. This meant that stores to the non-zero'th element would corrupt later frame data. Store static array allocas as field arrays in the coroutine frame. Added test. Committed by Gor Nishanov on behalf of ben-clayton Reviewers: GorNishanov, modocache Reviewed By: GorNishanov Subscribers: Orlando, capn, EricWF, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61372 llvm-svn: 360636
* [c++20] P1064R0: Allow virtual function calls in constant expressionRichard Smith2019-05-1315-57/+456
| | | | | | | | | | | | | evaluation. This reinstates r360559, reverted in r360580, with a fix to avoid crashing if evaluation-for-overflow mode encounters a virtual call on an object of a class with a virtual base class, and to generally not try to resolve virtual function calls to objects whose (notional) vptrs are not readable. (The standard rules are unclear here, but this seems like a reasonable approach.) llvm-svn: 360635
* [AMDGPU] gfx1010 clang targetStanislav Mekhanoshin2019-05-139-3/+37
| | | | | | Differential Revision: https://reviews.llvm.org/D61875 llvm-svn: 360634
* [Docs] Fix code formattign in variable.rstJonas Devlieghere2019-05-131-0/+1
| | | | | | Fixes missing newline between :: and the actual code. llvm-svn: 360632
* [CMake] Reinstate LLDB_CAN_USE_LLDB_SERVERJonas Devlieghere2019-05-132-3/+8
| | | | | | | | | | We cannot manipulate the LLDB_TOOL_LLDB_SERVER_BUILD directly from LLDBConfig.cmake because this would set the variable before the option is defined in AddLLVM.cmake. Instead, we need to use the LLDB_CAN_USE_LLDB_SERVER variable to conditionally add the lldb-server subdirectory. This should ensure the variable doesn't get cleared. llvm-svn: 360631
* [X86] Make `x86intrin.h`, `immintrin.h` includable with `-fno-gnu-inline-asm`.Volodymyr Sapsai2019-05-134-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Currently `immintrin.h` includes `pconfigintrin.h` and `sgxintrin.h` which contain inline assembly. It causes failures when building with the flag `-fno-gnu-inline-asm`. Fix by excluding functions with inline assembly when this extension is disabled. So far there was no need to support `_pconfig_u32`, `_enclu_u32`, `_encls_u32`, `_enclv_u32` on platforms that require `-fno-gnu-inline-asm`. But if developers start using these functions, they'll have compile-time undeclared identifier errors which is preferrable to runtime errors. rdar://problem/49540880 Reviewers: craig.topper, GBuella, rnk, echristo Reviewed By: rnk Subscribers: jkorous, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D61621 llvm-svn: 360630
* [gn] Fix buildVitaly Buka2019-05-133-0/+4
| | | | llvm-svn: 360629
* Removing an unused member variable; NFC.Aaron Ballman2019-05-131-2/+1
| | | | llvm-svn: 360628
* [X86] Use ISD::MERGE_VALUES to return from lowerAtomicArith instead of ↵Craig Topper2019-05-131-4/+8
| | | | | | | | | | | | | | calling ReplaceAllUsesOfValueWith and returning SDValue(). Returning SDValue() makes the caller think that nothing happened and it will end up executing the Expand path. This generates extra nodes that will need to be pruned as dead code. Returning an ISD::MERGE_VALUES will tell the caller that we'd like to make a change and it will take care of replacing uses. This will prevent falling into the Expand path. llvm-svn: 360627
* [OpenMP][Clang][BugFix] Split declares and math functions inclusion.Gheorghe-Teodor Bercea2019-05-1314-21/+66
| | | | | | | | | | | | | | | | Summary: This patches fixes an issue in which the __clang_cuda_cmath.h header is being included even when cmath or math.h headers are not included. Reviewers: jdoerfert, ABataev, hfinkel, caomhin, tra Reviewed By: tra Subscribers: tra, mgorny, guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61765 llvm-svn: 360626
* Make language option `GNUAsm` discoverable with `__has_extension` macro.Volodymyr Sapsai2019-05-133-0/+9
| | | | | | | | | | | | | | | | This can be used for better support of `-fno-gnu-inline-asm` builds. rdar://problem/49540880 Reviewers: aaron.ballman, rsmith Reviewed By: aaron.ballman Subscribers: eraman, jkorous, dexonsmith, craig.topper, cfe-commits Differential Revision: https://reviews.llvm.org/D61619 llvm-svn: 360625
* Disable TestEnvironment on WindowsJonas Devlieghere2019-05-131-0/+2
| | | | | | | | | | | | | | The input source file seems to be triggering an error in the Visual Studio headers. > xstddef:338:2: error: ''auto' return without trailing return type; > deduced return types are a C++14 extension I tried converting the test to use the %build stuff Zachary added, but that seems to be missing some Darwin support. Disabling the test on Windows in the meantime. llvm-svn: 360624
* [AMDGPU] gfx1010 SearchableTableEmitter patch for NSAStanislav Mekhanoshin2019-05-131-1/+1
| | | | | | | | This part was accidentally missing from NSA image support commit. Differential Revision: https://reviews.llvm.org/D61868 llvm-svn: 360623
* Introduce the ability to dump the AST to JSON.Aaron Ballman2019-05-1317-32/+2850
| | | | | | This adds the -ast-dump=json cc1 flag (in addition to -ast-dump=default, which is the default if no dump format is specified), as well as some initial AST dumping functionality and tests. llvm-svn: 360622
* [CMake] Simplify lldb-server handlingJonas Devlieghere2019-05-133-18/+8
| | | | | | | | | We can piggyback off the existing add_lldb_tool_subdirectory to decide whether or not lldb-server should be built. Differential revision: https://reviews.llvm.org/D61872 llvm-svn: 360621
* [Pass Pipeline][NFC] Add a test prior to committing D61726Nemanja Ivanovic2019-05-131-0/+155
| | | | | | | | | | This patch just adds a test case to show the differences in code emitted by opt before and after https://reviews.llvm.org/D61726. Previous attempt to commit this did not include the registered target requirement so it caused buildbot breaks. llvm-svn: 360620
* [X86] Various type corrections to the code that creates ↵Craig Topper2019-05-131-10/+13
| | | | | | | | | | | | | | | | | | LOCK_OR32mi8/OR32mi8Locked to the stack for idempotent atomic rmw and atomic fence. These are updates to match how isel table would emit a LOCK_OR32mi8 node. -Use i32 for the immediate zero even though only 8 bits are encoded. -Use i16 for segment register. -Use LOCK_OR32mi8 for idempotent atomic operations in 32-bit mode to match 64-bit mode. I'm not sure why OR32mi8Locked and LOCK_OR32mi8 both exist. The only difference seems to be that OR32mi8Locked is marked as UnmodeledSideEffects=1. -Emit an extra i32 result for the flags output. I don't know if the types here really matter just noticed it was inconsistent with normal behavior. llvm-svn: 360619
* [JITLink][MachO] Honor the no-dead-strip flag on nlist entries.Lang Hames2019-05-132-1/+17
| | | | llvm-svn: 360618
* [Support] Ensure redirected outputs don't contain output from previous tests.David L. Jones2019-05-131-0/+1
| | | | | | | | stdout may be buffered, and may not flush on every write. Explicitly flushing before redirecting the output ensures that the captured output does not contain output from other tests. llvm-svn: 360617
* [WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel ↵Nikita Popov2019-05-132-2/+50
| | | | | | | | | | | | | (PR41841) Usually this will abort fast-isel at the instruction using the non-legal result, but if the only use is in a different basic block, we'll incorrectly assume that the zext/sext is to i32 (rather than i128 in this case). Differential Revision: https://reviews.llvm.org/D61823 llvm-svn: 360616
* [AMDGPU] gfx1010 tests. NFC.Stanislav Mekhanoshin2019-05-1311-98/+526
| | | | llvm-svn: 360615
* Make more friendly with unions. Reviewed as https://reviews.llvm.org/D61858Marshall Clow2019-05-132-1/+23
| | | | llvm-svn: 360614
* [clang-tidy] readability-redundant-declaration: fix false positive with C ↵Matthias Gehre2019-05-133-2/+49
| | | | | | | | | | | | | | | | | | | "extern inline" Summary: readability-redundant-declaration was diagnosing a redundant declaration on "extern inline void f();", which is needed in C code to force an external definition of the inline function f. (This is different to how inline behaves in C++). Reviewers: alexfh, danielmarjamaki Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61700 llvm-svn: 360613
* Merge target and launch info environmentsJonas Devlieghere2019-05-133-1/+18
| | | | | | | | | | | Before this change we were overriding the launch info environment with the target environment. This meant that the environment variables passed to `process launch --environment <>` were lost. Instead of replacing the environment, we should merge them. Differential revision: https://reviews.llvm.org/D61864 llvm-svn: 360612
* Remove commented-out codeJonas Devlieghere2019-05-131-43/+0
| | | | llvm-svn: 360611
* Add a new LIBUNWIND_WEAK_PTHREAD Cmake option to forceSterling Augustine2019-05-133-2/+39
| | | | | | | | | | | calls into the pthread library use weak symbols. This option allows libpthread to be a weak dependency rather than a hard one. Differential Revision: https://reviews.llvm.org/D60285 llvm-svn: 360610
* [AMDGPU] Reorder includes per coding standard. NFC.Stanislav Mekhanoshin2019-05-131-1/+1
| | | | llvm-svn: 360609
* [AMDGPU] Remove now unused V2FP16_ONE constant def. NFC.Stanislav Mekhanoshin2019-05-131-1/+0
| | | | llvm-svn: 360608
* [clang][ASTContext] Call setAttached for comments attached to a declarationJan Korous2019-05-131-0/+2
| | | | | | | | | | | This is a bug affecting performance when compiling with -Wdocumentation. In Sema::ActOnDocumentable we're checking whether there are any comments unattached to declaration at the end of comment list whenever we encounter new documentable declaration. Since this property of RawComment was never set we were trying to find comments every time and that involves at least a couple expensive SourceLocation decompositions. Differential Revision: https://reviews.llvm.org/D61538 llvm-svn: 360607
* Revert [X86] Avoid SFB - Fix inconsistent codegen with/without debug info Robert Lougher2019-05-132-252/+2
| | | | | | Revert r360436 as it is causing clang-x64-windows-msvc buildbot to fail. llvm-svn: 360606
* [InstCombine] try harder to form rotate (funnel shift) (PR20750)Sanjay Patel2019-05-132-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a similar match for patterns ending in a truncate. This should be ok for all targets because the default expansion would still likely be better from replacing 2 'and' ops with 1. Attempt to show the logic equivalence in Alive (which doesn't currently have funnel-shift in its vocabulary AFAICT): %shamt = zext i8 %i to i32 %m = and i32 %shamt, 31 %neg = sub i32 0, %shamt %and4 = and i32 %neg, 31 %shl = shl i32 %v, %m %shr = lshr i32 %v, %and4 %or = or i32 %shr, %shl => %a = and i8 %i, 31 %shamt2 = zext i8 %a to i32 %neg2 = sub i32 0, %shamt2 %and4 = and i32 %neg2, 31 %shl = shl i32 %v, %shamt2 %shr = lshr i32 %v, %and4 %or = or i32 %shr, %shl https://rise4fun.com/Alive/V9r llvm-svn: 360605
* [TargetLowering] Handle multi depth GEPs w/ inline asm constraintsNick Desaulniers2019-05-136-72/+87
| | | | | | | | | | | | | | | | | | | | | | | Summary: X86TargetLowering::LowerAsmOperandForConstraint had better support than TargetLowering::LowerAsmOperandForConstraint for arbitrary depth getelementpointers for "i", "n", and "s" extended inline assembly constraints. Hoist its support from the derived class into the base class. Link: https://github.com/ClangBuiltLinux/linux/issues/469 Reviewers: echristo, t.p.northover Reviewed By: t.p.northover Subscribers: t.p.northover, E5ten, kees, jyknight, nemanjai, javed.absar, eraman, hiraditya, jsji, llvm-commits, void, craig.topper, nathanchance, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D61560 llvm-svn: 360604
* Stop defining negative versions of some lit feature keywords:Paul Robinson2019-05-131-9/+8
| | | | | | | | | | | | | | | | | | | zlib/nozlib, asan/not_asan, msan/not_msan, ubsan/not_ubsan. We still have two other ways to express the absence of a feature. First, we have the '!' operator to invert the sense of a keyword. For example, given a feature that depends on zlib being unavailable, its test can say: REQUIRES: !zlib Second, if a test doesn't play well with some features, such as sanitizers, that test can say: UNSUPPORTED: asan, msan The different ways of writing these exclusions both have the same technical effect, but have different implications to the reader. llvm-svn: 360603
* fixed typo made by commit r360595Andrey Churbanov2019-05-131-1/+2
| | | | llvm-svn: 360602
* [InstCombine] add tests for rotates with narrow shift amount (PR20750); NFCSanjay Patel2019-05-131-0/+46
| | | | llvm-svn: 360601
* gn build: Fewer dependencies in llvm/lib/TargetNico Weber2019-05-136-26/+44
| | | | | | | | | | | The tablegen groups only need public_deps for inc files included (possibly transitively) in other targets. Move inc files that are internan to the MCTargetDesc libraries into regular deps. Related to the changes that merged InstPrinter into MCTargetDesc (360484, 360486 etc). llvm-svn: 360600
* [DataFormatters] FindLibCppStdFunctionCallableInfo() currently uses ↵Shafik Yaghmour2019-05-131-2/+2
| | | | | | | | FindFunctions() in order to find a lambdas operator()() but using FindSymbolsMatchingRegExAndType() is cheaper and if we also anchor the regex using ^ this adds some additional performance gains. Differential Revision: https://reviews.llvm.org/D61759 llvm-svn: 360599
* [WebAssembly] Refactor relocation processing. NFC.Sam Clegg2019-05-131-19/+17
| | | | | | | | | This is the remaining NFC part of https://reviews.llvm.org/D61539 which was reverted. Differential Revision: https://reviews.llvm.org/D61800 llvm-svn: 360598
* gn build: Merge r360572Nico Weber2019-05-131-0/+3
| | | | llvm-svn: 360597
* [X86][SSE] LowerBuildVectorv4x32 - don't insert MOVQ for undef eltsSimon Pilgrim2019-05-132-27/+14
| | | | | | | | Fixes the regression noted in D61782 where a VZEXT_MOVL was being inserted because we weren't discriminating between 'zeroable' and 'all undef' for the upper elts. Differential Revision: https://reviews.llvm.org/D61782 llvm-svn: 360596
* Fixed creation of aliases in Windows build.Andrey Churbanov2019-05-131-2/+1
| | | | | | | | | Changed file extension of the destination of the copy of libomp.lib (it was mistakely .dll, now it is .lib) in installation on Windows. Differential Revision: https://reviews.llvm.org/D61673 llvm-svn: 360595
* [X86][SSE] Relax use limits for lowerAddSubToHorizontalOp (PR32433)Simon Pilgrim2019-05-133-53/+76
| | | | | | | | | | Now that we can use HADD/SUB for scalar additions from any pair of extracted elements (D61263), we can relax the one use limit as we will be able to merge multiple uses into using the same HADD/SUB op. This exposes a couple of missed opportunities in LowerBuildVectorv4x32 which will be committed separately. Differential Revision: https://reviews.llvm.org/D61782 llvm-svn: 360594
* [ELF] Full support for -n (--nmagic) and -N (--omagic) via common pagePeter Smith2019-05-1314-22/+515
| | | | | | | | | | | | | | | | | | | | | | The -n (--nmagic) disables page alignment, and acts as a -Bstatic The -N (--omagic) does what -n does but also marks the executable segment as writeable. As page alignment is disabled headers are not allocated unless explicit in the linker script. To disable page alignment in LLD we choose to set the page sizes to 1 so that any alignment based on the page size does nothing. To set the Target->PageSize to 1 we implement -z common-page-size, which has the side effect of allowing the user to set the value as well. Setting the page alignments to 1 does mean that any use of CONSTANT(MAXPAGESIZE) or CONSTANT(COMMONPAGESIZE) in a linker script will return 1, unlike in ld.bfd. However given that -n and -N disable paging these probably shouldn't be used in a linker script where -n or -N is in use. Differential Revision: https://reviews.llvm.org/D61688 llvm-svn: 360593
* [TargetLowering] Add SimplifyDemandedBits support for ZERO_EXTEND_VECTOR_INREGSimon Pilgrim2019-05-133-53/+68
| | | | | | More work for PR39709. llvm-svn: 360592
* [X86] Add test case for mask register variant of PR41619 which should be ↵Craig Topper2019-05-131-1/+32
| | | | | | fixed after r360552 llvm-svn: 360591
* [libcxx] teach type_traits test about long uint32_tBrian Cain2019-05-131-1/+8
| | | | | | Patch by Ben Craig. llvm-svn: 360590
* Revert "[LSR] Tweak setup cost depth threshold to 10."Amara Emerson2019-05-131-1/+1
| | | | | | Changing the threshold might not be the best long term approach. Revert for now. llvm-svn: 360589
* [X86] Add SimplifyDemandedBits support for PEXTRB/PEXTRW (PR39709)Simon Pilgrim2019-05-131-1/+6
| | | | | | Test case will be included in a followup - its being used but its tricky to show a case that isn't caught at a later stage anyway. llvm-svn: 360588
* [NativePDB] Fix tests after r360569Aleksandr Urakov2019-05-131-6/+0
| | | | llvm-svn: 360587
* Add a test for LWG#3204 and mark it as complete. Reviewed as ↵Marshall Clow2019-05-132-1/+34
| | | | | | https://reviews.llvm.org/D61829 Thanks to Zoe for the patch. llvm-svn: 360586
OpenPOWER on IntegriCloud