summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [DebugInfo] Fix some Clang-tidy modernize-use-default and Include What You ↵Eugene Zelenko2016-11-2319-126/+167
| | | | | | | | Use warnings; other minor fixes (NFC). Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews. llvm-svn: 287838
* [COFF] Add DebugInfoCodeView dependencyRui Ueyama2016-11-231-0/+1
| | | | | | | | | | | | | rL287555 introduces a link error when building with BUILD_SHARED_LIBS: undefined reference to llvm::codeview::CVSymbolDumper::dump(), and more... The functions are available in libDebugInfoCodeView, from LLVM. Patch by Visoiu Mistrih Francis! llvm-svn: 287837
* Set default entry point to .text if no entry point is found.Rui Ueyama2016-11-232-15/+51
| | | | | | | | | Previously, if a symbol specified by -e or ENTRY() is not found, we didn't set entry point address. That is incompatible with GNU because GNU linkers set the first address of .text to entry. This patch implement that behavior. llvm-svn: 287836
* [X86][SSE] Add awareness of (v)cvtpd2dq and vcvtpd2udq implicit zeroing of ↵Simon Pilgrim2016-11-234-25/+30
| | | | | | | | upper 64-bits of xmm result We've already added the equivalent for (v)cvttpd2dq (rL284459) and vcvttpd2udq llvm-svn: 287835
* [IR] Fix some Clang-tidy modernize-use-default, modernize-use-equal-delete ↵Eugene Zelenko2016-11-2312-78/+241
| | | | | | | | and Include What You Use warnings; other minor fixes (NFC). Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews. llvm-svn: 287834
* [test] Use a helper macro to refer to MAP_ANON (NFC)Vedant Kumar2016-11-231-2/+8
| | | | | | | Some of our internal bots use old SDK's which don't define MAP_ANON. Use a helper macro to pass the right flag into mmap(). llvm-svn: 287833
* [ELF][MIPS] Fix handling of _gp/_gp_disp/__gnu_local_gp symbolsSimon Atanasyan2016-11-237-22/+86
| | | | | | | | | | | | | | | | | | | | | | | | Offset between beginning of a .got section and _gp symbols used in MIPS GOT relocations calculations. Usually the expression looks like VA + Offset - GP, where VA is the .got section address, Offset - offset of the GOT entry, GP - offset between .got and _gp. Also there two "magic" symbols _gp_disp and __gnu_local_gp which hold the offset mentioned above. These symbols might be referenced by MIPS relocations. Now the linker always defines _gp symbol and uses hardcoded value for its initialization. So offset between .got and _gp is 0x7ff0. The _gp_disp and __gnu_local_gp defined if required and initialized by 0x7ff0. In fact that is not correct because _gp symbol might be defined by a linker script and holds arbitrary value. In that case we need to use this value in relocation calculation and initialize _gp_disp and __gnu_local_gp properly. The patch fixes the problem and completes fixing the bug #30311. https://llvm.org/bugs/show_bug.cgi?id=30311 Differential revision: https://reviews.llvm.org/D27036 llvm-svn: 287832
* [SelectionDAG] Early-out in TargetLowering::expandMUL (NFC)Nicolai Haehnle2016-11-231-77/+80
| | | | | | | | | | | | Summary: Reduce indentation level; preparation for D24956. Reviewers: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27063 llvm-svn: 287831
* Remove trailing whitespace.Rui Ueyama2016-11-231-1/+1
| | | | llvm-svn: 287830
* [libcxx] [test] D27027: Strip trailing whitespace.Stephan T. Lavavej2016-11-2358-91/+91
| | | | llvm-svn: 287829
* [libcxx] [test] D27026: Fix copy-paste silliness; ULL can't ever be 32-bit.Stephan T. Lavavej2016-11-231-1/+1
| | | | llvm-svn: 287828
* [libcxx] [test] D27020: Fix MSVC warning C4245 "conversion from 'X' to 'Y', ↵Stephan T. Lavavej2016-11-234-4/+4
| | | | | | | | | | signed/unsigned mismatch", part 7/12. When initializing unsigned integers to their maximum values, change "const T M(~0);" to "const T M(static_cast<T>(-1));". ~0 and -1 are equivalent, but I consider the -1 form to be significantly clearer (and more consistent with other tests). llvm-svn: 287827
* [libcxx] [test] D27019: Fix MSVC warning C4245 "conversion from 'X' to 'Y', ↵Stephan T. Lavavej2016-11-237-15/+15
| | | | | | | | signed/unsigned mismatch", part 6/12. Add static_cast when initializing unsigned integers with negative numbers (in order to obtain big values). llvm-svn: 287826
* [libcxx] [test] D27018: Fix MSVC warning C4018 "signed/unsigned mismatch", ↵Stephan T. Lavavej2016-11-234-5/+5
| | | | | | | | | | | | | | | | | | | part 5/12. Various changes: test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp Change M from unsigned to int. It's compared against "int x", and we binary_search() for it within a vector<int>. test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval_param.pass.cpp Add static_cast<unsigned> when comparing int to unsigned. test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp Change unsigned indices to int when we're being given int as a bound. llvm-svn: 287825
* [libcxx] [test] D27016: Fix MSVC warning C4018 "signed/unsigned mismatch", ↵Stephan T. Lavavej2016-11-236-19/+25
| | | | | | | | | | part 4/12. Change "int j;" indices to "std::size_t j;". Also, include <cstddef> when it wasn't already being included. llvm-svn: 287824
* [libcxx] [test] D27015: Fix MSVC warning C4018 "signed/unsigned mismatch", ↵Stephan T. Lavavej2016-11-2321-29/+29
| | | | | | | | part 3/12. Change unsigned to int in parameters. llvm-svn: 287823
* [libcxx] [test] D27014: Fix MSVC warning C4018 "signed/unsigned mismatch", ↵Stephan T. Lavavej2016-11-2320-65/+83
| | | | | | | | | | part 2/12. Add static_cast<std::size_t> when comparing int to std::size_t. Also, include <cstddef> when it wasn't already being included. llvm-svn: 287822
* [X86][AVX512VL] Add v2f64 -> v2i32/v2f32 + zero codegen testsSimon Pilgrim2016-11-231-0/+79
| | | | llvm-svn: 287821
* [libcxx] [test] D27013: Fix MSVC warning C4018 "signed/unsigned mismatch", ↵Stephan T. Lavavej2016-11-23139-210/+349
| | | | | | | | | | part 1/12. Change loop indices from int to std::size_t. Also, include <cstddef> when it wasn't already being included. llvm-svn: 287820
* Fix typo.Hongbin Zheng2016-11-232-15/+15
| | | | llvm-svn: 287819
* AMDGPU: Cleanup immediate folding codeMatt Arsenault2016-11-231-64/+62
| | | | | | | Move code down to use, reorder to avoid hard to follow immediate folding logic. llvm-svn: 287818
* AMDGPU: Fix debug printingMatt Arsenault2016-11-231-1/+1
| | | | | | The uint8_t was printed as a char which didn't really work. llvm-svn: 287817
* Use llvm::utohexstr instead of Twine::utohexstr.Rui Ueyama2016-11-231-2/+1
| | | | | | | They are essentially the same in this context, so I prefer the one that doesn't need `Twine::`. llvm-svn: 287814
* [X86][SSE] Add v2i64 -> v2i32 + zero codegen testSimon Pilgrim2016-11-231-220/+390
| | | | llvm-svn: 287813
* AMDGPU: Fix not setting kill flag on temp reg when spillingMatt Arsenault2016-11-231-1/+1
| | | | llvm-svn: 287808
* AMDGPU: Fix adding extra implicit def of registerMatt Arsenault2016-11-231-14/+25
| | | | | | | In the scalar case, there's no reason to add an additional def of the same register. llvm-svn: 287807
* AMDGPU: Fix MMO when splitting spillMatt Arsenault2016-11-235-72/+104
| | | | | | | | | | The size and offset were wrong. The size of the object was being used for the size of the access, when here it is really being split into 4-byte accesses. The underlying object size is set in the MachinePointerInfo, which also didn't have the offset set. llvm-svn: 287806
* Revert "[lit] When setting SDKROOT on Darwin, use '--sdk macosx' to find the ↵Vedant Kumar2016-11-231-1/+1
| | | | | | | | | right SDK path." This reverts commit r287403. It breaks an internal asan bot. According to Kuba, a fix is up for review here: https://reviews.llvm.org/D26929 llvm-svn: 287804
* llvm-nm: Print correct symbol types for init and fini sectionsMeador Inge2016-11-233-0/+11
| | | | | | | | | This patch fixes a small bug where symbols defined in the INIT and FINI sections were incorrectly getting a type of 'n'. Differential Revision: https://reviews.llvm.org/D26937 llvm-svn: 287803
* llvm-nm: Don't print value or size for undefined or weak symbolsMeador Inge2016-11-234-10/+23
| | | | | | | | | | | | | | | | | Undefined and weak symbols don't have a meaningful size or value. As such, nothing should be printed for those attributes (this is already done for the address with 'U') with the BSD format. This matches what GNU nm does. Note that for the POSIX.2 format [1] zero values are still printed for the size and value. This seems in spirit with the format strings in that specification, but is debatable. [1] http://pubs.opengroup.org/onlinepubs/9699919799/ Differential Revision: https://reviews.llvm.org/D26936 llvm-svn: 287802
* [SLP] Add more tests for SLP Vectorizer.Alexey Bataev2016-11-231-0/+302
| | | | llvm-svn: 287801
* [LoopUnroll] Move code to exit early. NFC.Haicheng Wu2016-11-231-10/+8
| | | | | | | | Just to save some compilation time. Differential Revision: https://reviews.llvm.org/D26784 llvm-svn: 287800
* Fix this on 32 bit hosts.Rafael Espindola2016-11-231-1/+1
| | | | | | Looks like we have no 32 bit bot that builds with mips support. llvm-svn: 287799
* Revert "[Triple] Add Facebook vendor"Daniel Berlin2016-11-232-3/+0
| | | | | | | | | | This reverts commit r287684 Objections on the review thread had not been addressed to prior to commit. I asked the committer to revert, but i expect they are gone for the US holiday or something. llvm-svn: 287798
* Fix uninitialized variable access.Rui Ueyama2016-11-231-1/+1
| | | | llvm-svn: 287797
* [PPC] revert r287795Ehsan Amiri2016-11-235-386/+9
| | | | | | A test that passed locally is failing on one of the build bots. llvm-svn: 287796
* [PPC] support for arithmetic builtins in the FEEhsan Amiri2016-11-235-9/+386
| | | | | | | | | | | | | | | | | | | | (commit again after fixing the buildbot failures) This adds various overloads of the following builtins to altivec.h: vec_neg vec_nabs vec_adde vec_addec vec_sube vec_subec vec_subc Note that for vec_sub builtins on 32 bit integers, the semantics is similar to what ISA describes for instructions like vsubecuq that work on quadwords: the first operand is added to the one's complement of the second operand. (As opposed to two's complement which I expected). llvm-svn: 287795
* Make log(), error() and fatal() thread-safe.Rui Ueyama2016-11-231-3/+14
| | | | llvm-svn: 287794
* Add dllexport default ctor closure PCH regression test for PR31121Reid Kleckner2016-11-231-0/+26
| | | | | | Follow up to r287774 llvm-svn: 287793
* [X86] Allow folding of stack reloads when loading a subreg of the spilled regMichael Kuperstein2016-11-238-25/+78
| | | | | | | | | | | | | We did not support subregs in InlineSpiller:foldMemoryOperand() because targets may not deal with them correctly. This adds a target hook to let the spiller know that a target can handle subregs, and actually enables it for x86 for the case of stack slot reloads. This fixes PR30832. Differential Revision: https://reviews.llvm.org/D26521 llvm-svn: 287792
* [asan/win] Skip incremental linker padding during unregistrationReid Kleckner2016-11-231-0/+5
| | | | | | Should fix issues that came up while testing Win64 ASan. llvm-svn: 287791
* Limit default maximum number of errors to 20.Rui Ueyama2016-11-236-1/+44
| | | | | | | | | | | | | | | | | | This is in the context of https://llvm.org/bugs/show_bug.cgi?id=31109. When LLD prints out errors for relocations, it tends to print out extremely large number of errors (like millions) because it would print out one error per relocation. This patch makes LLD bail out if it prints out more than 20 errors. You can configure the limitation using -error-limit argument. -error-limit=0 means no limit. I chose the flag name because Clang has the same feature as -ferror-limit. "f" doesn't make sense to us, so I omitted it. Differential Revision: https://reviews.llvm.org/D26981 llvm-svn: 287789
* Re-commit r287727: Use SHA1::hash and MD5::hash functions.Rui Ueyama2016-11-231-8/+2
| | | | | | | r287727 was not a change that broke buildbots; the other change (r287726) that I made to LLVM broke them. llvm-svn: 287788
* Define toString() as a generic function to get a string for error message.Rui Ueyama2016-11-2312-58/+66
| | | | | | | | | | | | | | | We have different functions to stringize objects to construct error messages. For InputFile, we have getFilename, and for InputSection, we have getName. You had to memorize them. I think this is the case where the function overloading comes in handy. This patch defines toString() functions that are overloaded for all these types, so that you just call it in error(). Differential Revision: https://reviews.llvm.org/D27030 llvm-svn: 287787
* llvm-readobj: Use hash tables to print dynamic symbols.Hemant Kulkarni2016-11-232-1/+136
| | | | | | | -symbols prints both .symtab and .dynsym symbols for GNU style in ELF. -dyn-symbols prints symbols looking up through hash tables. This helps validate hash tables. llvm-svn: 287786
* [asan/win] Check assumptions about the incremental linker moreReid Kleckner2016-11-231-1/+9
| | | | | | Remove a needless cast as well. llvm-svn: 287785
* [PM] Change the static object whose address is used to uniquely identifyChandler Carruth2016-11-2371-179/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | analyses to have a common type which is enforced rather than using a char object and a `void *` type when used as an identifier. This has a number of advantages. First, it at least helps some of the confusion raised in Justin Lebar's code review of why `void *` was being used everywhere by having a stronger type that connects to documentation about this. However, perhaps more importantly, it addresses a serious issue where the alignment of these pointer-like identifiers was unknown. This made it hard to use them in pointer-like data structures. We were already dodging this in dangerous ways to create the "all analyses" entry. In a subsequent patch I attempted to use these with TinyPtrVector and things fell apart in a very bad way. And it isn't just a compile time or type system issue. Worse than that, the actual alignment of these pointer-like opaque identifiers wasn't guaranteed to be a useful alignment as they were just characters. This change introduces a type to use as the "key" object whose address forms the opaque identifier. This both forces the objects to have proper alignment, and provides type checking that we get it right everywhere. It also makes the types somewhat less mysterious than `void *`. We could go one step further and introduce a truly opaque pointer-like type to return from the `ID()` static function rather than returning `AnalysisKey *`, but that didn't seem to be a clear win so this is just the initial change to get to a reliably typed and aligned object serving is a key for all the analyses. Thanks to Richard Smith and Justin Lebar for helping pick plausible names and avoid making this refactoring many times. =] And thanks to Sean for the super fast review! While here, I've tried to move away from the "PassID" nomenclature entirely as it wasn't really helping and is overloaded with old pass manager constructs. Now we have IDs for analyses, and key objects whose address can be used as IDs. Where possible and clear I've shortened this to just "ID". In a few places I kept "AnalysisID" to make it clear what was being identified. Differential Revision: https://reviews.llvm.org/D27031 llvm-svn: 287783
* lld: Default image base address to 0x200000 on x86-64Ed Maste2016-11-2371-464/+465
| | | | | | | | | Align to the large page size (known as a superpage or huge page). FreeBSD automatically promotes large, superpage-aligned allocations. Differential Revision: https://reviews.llvm.org/D27042 llvm-svn: 287782
* [LoadStoreVectorizer] Enable vectorization of stores in the presence of an ↵Alina Sbirlea2016-11-233-8/+86
| | | | | | | | | | | | | | | | | | aliasing load Summary: The "getVectorizablePrefix" method would give up if it found an aliasing load for a store chain. In practice, the aliasing load can be treated as a memory barrier and all stores that precede it are a valid vectorizable prefix. Issue found by volkan in D26962. Testcase is a pruned version of the one in the original patch. Reviewers: jlebar, arsenm, tstellarAMD Subscribers: mzolotukhin, wdng, nhaehnle, anna, volkan, llvm-commits Differential Revision: https://reviews.llvm.org/D27008 llvm-svn: 287781
* [asan/win] Fix incremental linking vs. global registrationReid Kleckner2016-11-234-7/+17
| | | | | | | | | | The MSVC incremental linker pads every global out to 256 bytes in case it changes size after an incremental link. So, skip over null entries in the DSO-wide asan globals array. This only works if the global padding size is divisible by the size of the asan global object, so add some defensive CHECKs. llvm-svn: 287780
OpenPOWER on IntegriCloud