summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [compiler-rt] Remove unused formal parameters from allocateOneNode. NFC.Matt Davis2018-10-091-3/+2
| | | | | | | | | | | | | | Summary: This is just a minor cleanup to the allocateOneNode interface. The formals are no-longer used, so I just removed them. Reviewers: davidxl, void Reviewed By: davidxl Subscribers: dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D52509 llvm-svn: 344073
* Remove a use of template to make code less abstracted.Rui Ueyama2018-10-091-19/+26
| | | | | | | Sometimes, code that is a bit longer but doesn't use template is easier to understand than code that uses template. llvm-svn: 344072
* [X86] When lowering unsigned v2i64 setcc without SSE42, flip the sign bits ↵Craig Topper2018-10-0928-272/+266
| | | | | | | | | | | | | | in the v2i64 type then bitcast to v4i32. This may give slightly better opportunities for DAG combine to simplify with the operations before the setcc. It also matches the type the xors will eventually be promoted to anyway so it saves a legalization step. Almost all of the test changes are because our constant pool entry is now v2i64 instead of v4i32 on 64-bit targets. On 32-bit targets getConstant should be emitting a v4i32 build_vector and a v4i32->v2i64 bitcast. There are a couple test cases where it appears we now combine a bitwise not with one of these xors which caused a new constant vector to be generated. This prevented a constant pool entry from being shared. But if that's an issue we're concerned about, it seems we need to address it another way that just relying a bitcast to hide it. This came about from experiments I've been trying with pushing the promotion of and/or/xor to vXi64 later than LegalizeVectorOps where it is today. We run LegalizeVectorOps in a bottom up order. So the and/or/xor are promoted before their users are legalized. The bitcasts added for the promotion act as a barrier to computeKnownBits if we try to use it during vector legalization of a later operation. So by moving the promotion out we can hopefully get better results from computeKnownBits/computeNumSignBits like in LowerTruncate on AVX512. I've also looked at running LegalizeVectorOps in a top down order like LegalizeDAG, but thats showing some other issues. llvm-svn: 344071
* PR39231: fix null dereference when diagnosing deduction failure due toRichard Smith2018-10-092-1/+17
| | | | | | conflicting values for a non-type pack. llvm-svn: 344070
* [SLPVectorizer] Check that lowered type is floating point before calling ↵Sam Clegg2018-10-092-1/+31
| | | | | | | | | | | | | | | | | | isFabsFree In the case of soft-fp (e.g. fp128 under wasm) the result of getTypeLegalizationCost() can be an integer type even if the input is floating point (See LegalizeTypeAction::TypeSoftenFloat). Before calling isFabsFree() (which asserts if given a non-fp type) we need to check that that result is fp. This is safe since in fabs is certainly not free in the soft-fp case. Fixes PR39168 Differential Revision: https://reviews.llvm.org/D52899 llvm-svn: 344069
* [DWARF] Make llvm-dwarfdump display the .debug_loc.dwo section. Fixes PR38991.Wolfgang Pieb2018-10-092-5/+24
| | | | | | | | Reviewer: dblaikie Differential Revision: https://reviews.llvm.org/D52444 llvm-svn: 344068
* [InstCombine] add tests for extract subvector shuffles; NFCSanjay Patel2018-10-091-6/+39
| | | | llvm-svn: 344067
* Fix lld test.Zachary Turner2018-10-091-19/+0
| | | | | | | I removed this output from the dumper because it was non-portable, but I didn't update the test which checked the output. llvm-svn: 344066
* lld-link: attempt to fix tests on Windows after r344061.Nico Weber2018-10-091-1/+1
| | | | llvm-svn: 344065
* Add missing spaceAdrian Prantl2018-10-091-1/+1
| | | | llvm-svn: 344064
* [PDB] Fix failure on big endian machines.Zachary Turner2018-10-093-7/+3
| | | | | | | | | | | | | | | We changed an ArrayRef<uint8_t> to an ArrayRef<uint32_t>, but it needs to be an ArrayRef<support::ulittle32_t>. We also change ArrayRef<> to FixedStreamArray<>. Technically an ArrayRef<> will work, but it can cause a copy in the underlying implementation if the memory is not contiguous, and there's no reason not to use a FixedStreamArray<>. Thanks to nemanjai@ and thakis@ for helping me track this down and confirm the fix. llvm-svn: 344063
* Add an entry to the release notes.Rui Ueyama2018-10-091-0/+3
| | | | llvm-svn: 344062
* lld-link: Use /pdbsourcepath: for more places when present.Nico Weber2018-10-092-20/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /pdbsourcepath: was added in https://reviews.llvm.org/D48882 to make it possible to have relative paths in the debug info that clang-cl writes. lld-link then makes the paths absolute at link time, which debuggers require. This way, clang-cl's output is independent of the absolute path of the build directory, which is useful for cacheability in distcc-like systems. This patch extends /pdbsourcepath: (if passed) to also be used for: 1. The "cwd" stored in the env block in the pdb is /pdbsourcepath: if present 2. The "exe" stored in the env block in the pdb is made absolute relative to /pdbsourcepath: instead of the cwd 3. The "pdb" stored in the env block in the pdb is made absolute relative to /pdbsourcepath: instead of the cwd 4. For making absolute paths to .obj files referenced from the pdb /pdbsourcepath: is now useful in three scenarios (the first one already working before this change): 1. When building with full debug info, passing the real build dir to /pdbsourcepath: allows having clang-cl's output to be independent of the build directory path. This patch effectively doesn't change behavior for this use case (assuming the cwd is the build dir). 2. When building without compile-time debug info but linking with /debug, a fake fixed /pdbsourcepath: can be passed to get symbolized stacks while making the pdb and exe independent of the current build dir. For this two work, lld-link needs to be invoked with relative paths for the lld-link invocation itself (for "exe"), for the pdb output name, the exe output name (for "pdb"), and the obj input files, and no absolute path must appear on the link command (for "cmd" in the pdb's env block). Since no full debug info is present, it doesn't matter that the absolute path doesn't exist on disk -- we only get symbols in stacks. 3. When building production builds with full debug info that don't have local changes, and that get source indexed and their pdbs get uploaded to a symbol server. /pdbsourcepath: again makes the build output independent of the current directory, and the fixed path passed to /pdbsourcepath: can be given the source indexing transform so that it gets mapped to a repository path. This has the same requirements as 2. This patch also makes it possible to create PDB files containing Windows-style absolute paths when cross-compiling on a POSIX system. Differential Revision: https://reviews.llvm.org/D53021 llvm-svn: 344061
* [X86] Autogenerate complete checks. NFCCraig Topper2018-10-091-122/+143
| | | | llvm-svn: 344060
* [AArch64][x86] add tests for bitcasted fnabs; NFCSanjay Patel2018-10-092-0/+96
| | | | | | Alternate target coverage for D44548. llvm-svn: 344059
* [clang-tidy] Fix handling of parens around new expressions in ↵Alexander Kornienko2018-10-094-24/+61
| | | | | | | | | | | | | | | | | | make_<smartptr> checks. Summary: Extra parentheses around a new expression result in incorrect code after applying fixes. Reviewers: hokein Reviewed By: hokein Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D52989 llvm-svn: 344058
* [CUDA][HIP] Fix ShouldDeleteSpecialMember for inherited constructorsYaxun Liu2018-10-093-2/+305
| | | | | | | | | | | | | | | | | | | | | ShouldDeleteSpecialMember is called upon inherited constructors. It calls inferCUDATargetForImplicitSpecialMember. Normally the special member enum passed to ShouldDeleteSpecialMember matches the constructor. However this is not true when inherited constructor is passed, where DefaultConstructor is passed to treat the inherited constructor as DefaultConstructor. However inferCUDATargetForImplicitSpecialMember expects the special member enum argument to match the constructor, which results in assertion when this expection is not satisfied. This patch checks whether the constructor is inherited. If true it will get the real special member enum for the constructor and pass it to inferCUDATargetForImplicitSpecialMember. Differential Revision: https://reviews.llvm.org/D51809 llvm-svn: 344057
* [InstCombine] make helper function 'static'; NFCSanjay Patel2018-10-091-2/+2
| | | | llvm-svn: 344056
* [clang-move] Fix broken json output.Eric Liu2018-10-091-3/+4
| | | | llvm-svn: 344055
* [clangd] Fix an accident change in r342999.Haojian Wu2018-10-091-1/+1
| | | | llvm-svn: 344054
* [libcxx] Mark std::async race condition test as unsupported on DarwinLouis Dionne2018-10-091-0/+4
| | | | | | | | | | PR38682 added a test to check for a race condition in std::future. Part of the fix is part of the dylib, but there is no released version of mac OS X that ships a dylib containing the fix. Hence, this test can (and sometimes does) when testing on OS X. This commit marks the test as unsupported to avoid spurious failures. llvm-svn: 344053
* [NFC][unwind] Improve error message when a type has more than one RTTIsLouis Dionne2018-10-091-2/+3
| | | | | | | | | | The "dynamic_cast error 2" error can apparently happen when the same type (with RTTI) is defined in more than one translation unit, and those translation units are linked together. This is technically an ODR violation, but making the error message more obvious is still helpful. llvm-svn: 344052
* Fix function case.Guillaume Chatelet2018-10-092-2/+2
| | | | llvm-svn: 344051
* [llvm-exegesis] Fix invalid return type and add a Dump function.Guillaume Chatelet2018-10-092-8/+62
| | | | | | | | | | Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D53020 llvm-svn: 344050
* [OPENMP][NVPTX] Support memory coalescing for globalized variables.Alexey Bataev2018-10-099-71/+175
| | | | | | | | | Added support for memory coalescing for better performance for globalized variables. From now on all the globalized variables are represented as arrays of 32 elements and each thread accesses these elements using `tid & 31` as index. llvm-svn: 344049
* [x86] use demanded bits to simplify masked store codegenSanjay Patel2018-10-092-22/+17
| | | | | | | | | | | | As noted in D52747, if we prefer IR to use trunc for bool vectors rather than and+icmp, we can expose codegen shortcomings as seen here with masked store. Replace a hard-coded PCMPGT simplification with the more general demanded bits call to improve things. Differential Revision: https://reviews.llvm.org/D52964 llvm-svn: 344048
* Mark intercept-rethrow-exception.cc as XFAIL on NetBSDKamil Rytarowski2018-10-091-0/+4
| | | | | | | This is an ASan test for functionality that has not been ported to NetBSD so far. llvm-svn: 344047
* [clang-tidy] NFC fix warnings from missing bracesJonas Toth2018-10-091-5/+6
| | | | | | | | | The std::array create multiple StringRef but did not wrap them in braces. Some compilers warned for that. Adding the braces is not possible and result in a compilation error. This commit changes the array to vector which works without warning. llvm-svn: 344046
* Disable failing tests lib/asan/tests on NetBSDKamil Rytarowski2018-10-092-0/+4
| | | | | | These isses are not analyzed. llvm-svn: 344045
* [clangd] fix miscompiling lower_bound callJonas Toth2018-10-091-2/+3
| | | | llvm-svn: 344044
* [SelectionDAG] Add SIGN_EXTEND_VECTOR_INREG and CONCAT_VECTORS support to ↵Simon Pilgrim2018-10-092-1/+30
| | | | | | | | SimplifyDemandedBits Fix for AVX1 masked load/store regression on D52964 llvm-svn: 344043
* Skip unsupported MSan tests on NetBSDKamil Rytarowski2018-10-091-0/+4
| | | | | | libm functions remquol and lgammal are missing on NetBSD. llvm-svn: 344042
* Mark 4 MSan tests as XFAIL for NetBSDKamil Rytarowski2018-10-094-0/+12
| | | | | | | | | | Failing ones: - chained_origin_with_signals - dtls_test - ioctl_custom - signal_stress_test llvm-svn: 344041
* [mips] Fix FDE/CFI encoding in case of N32 ABISimon Atanasyan2018-10-092-3/+26
| | | | | | | | | | For O32 and N32 ABI FDE/CFI encoding should be `DW_EH_PE_sdata4` and only N64 ABI uses `DW_EH_PE_sdata8`. To cover all cases this patch check code pointer size and setup a correct FDE/CFI encoding type. Differential revision: https://reviews.llvm.org/D52876 llvm-svn: 344040
* [mips] Set pointer size to 4 bytes for N32 ABISimon Atanasyan2018-10-092-2/+14
| | | | | | | | | | | | | | CodePointerSize and CalleeSaveStackSlotSize values are used in DWARF generation. In case of MIPS it's incorrect to check for Triple::isMIPS64() only this function returns true for N32 ABI too. Now we do not have a method to recognize N32 if it's specified by a command line option and is not a part of a target triple. So we check for Triple::GNUABIN32 only. It's better than nothing. Differential revision: https://reviews.llvm.org/D52874 llvm-svn: 344039
* Mark MSan fork test as UNSUPPORTED on NetBSDKamil Rytarowski2018-10-091-0/+3
| | | | | | This test sometimes hangs for unknown reason. llvm-svn: 344038
* Fix buildbot failures with the newly added test case (triple was missing).Nemanja Ivanovic2018-10-091-1/+1
| | | | llvm-svn: 344037
* [PowerPC] Remove self-copies in pre-emit peepholeNemanja Ivanovic2018-10-093-0/+162
| | | | | | | | | | | | | | | | | | There are occasionally instances where AADB rewrites registers in such a way that a reg-reg copy becomes a self-copy. Such an instruction is obviously redundant and can be removed. This patch does precisely that. Note that this will not remove various nop's that we insert (which are themselves just self-copies). The reason those are left alone is that all of them have their own opcodes (that just encode to a self-copy). What prompted this patch is the fact that these self-copies sometimes end up using registers that make the instruction a priority-setting nop, thereby having a significant effect on performance. Differential revision: https://reviews.llvm.org/D52432 llvm-svn: 344036
* Reflect the current reality and disable lsan tests on NetBSDKamil Rytarowski2018-10-091-0/+1
| | | | | | LSan/NetBSD is still in development (Stop-The-World routine missed). llvm-svn: 344035
* Use PTHREAD_STACK_MIN conditionally in a testKamil Rytarowski2018-10-091-0/+2
| | | | | | | | PTHREAD_STACK_MIN is not available on NetBSD as it's not clear what the value shall be represented by this constant on a multiplatform OS. llvm-svn: 344034
* [clangd] Mark colon as a safe character when percent-encoding.Kadir Cetinkaya2018-10-092-4/+9
| | | | | | | | | | | | | | Summary: Also change output of percent-encoding to use upper-case letters. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D53016 llvm-svn: 344033
* [llvm-exegesis] Fix wrong index type.Guillaume Chatelet2018-10-092-2/+3
| | | | llvm-svn: 344032
* [analyzer][www] Add more useful linksKristof Umann2018-10-091-14/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D52993 llvm-svn: 344031
* [clangd] Fix nondeterministic testSam McCall2018-10-091-1/+4
| | | | llvm-svn: 344030
* [llvm-exegesis] Fix unused lambda capture.Guillaume Chatelet2018-10-091-1/+1
| | | | llvm-svn: 344029
* [llvm-exegesis][NFC] Use accessors for Operand.Guillaume Chatelet2018-10-096-93/+204
| | | | | | | | | | | | Summary: This moves checking logic into the accessors and makes the structure smaller. It will also help when/if Operand are generated from the TD files. Subscribers: tschuett, courbet, llvm-commits Differential Revision: https://reviews.llvm.org/D52982 llvm-svn: 344028
* [ADT] Force the alignment of the `data` field of `IntervalMap`Aleksandr Urakov2018-10-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch forces the alignment of the `data` field of `IntervalMap`. It is because x86 MSVC doesn't apply automatically (without `__declspec(align(...))`) alignments more than 4 bytes, even if `alignof` has returned so. Consider the example: https://godbolt.org/z/zIPa_G Here `alignof` for both `S0` and `S1` returns `8`, but only `S1` is really aligned on x86. The explanation of this behavior is here: https://docs.microsoft.com/en-us/cpp/build/conflicts-with-the-x86-compiler Reviewers: bkramer, stoklund, hans, rnk Reviewed By: rnk Subscribers: dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D52613 llvm-svn: 344027
* [ASTMatcher] Add missing imaginaryLiteralStephen Kelly2018-10-091-0/+1
| | | | llvm-svn: 344026
* [clangd] Revert back to previous heuristic for diagnostic range extraction.Kadir Cetinkaya2018-10-092-8/+11
| | | | | | | | | | | | | | Summary: Also add a few new test cases and a special case into handling of empty fixit ranges that collides with location of a diag. Reviewers: sammccall, ilya-biryukov Reviewed By: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D52889 llvm-svn: 344025
* [clangd] Avoid cache main file status in preamble.Eric Liu2018-10-094-6/+28
| | | | | | | | | | | | Summary: Main file can certainly change when reusing preamble. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52991 llvm-svn: 344024
OpenPOWER on IntegriCloud