summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a test for MemorySSA. NFC.George Burgess IV2016-02-051-0/+24
| | | | | | | We don't currently have many tests that deal with operations on multiple local MemoryLocations. This new test helps out a bit in that regard. llvm-svn: 259854
* Add Support to llvm-c-test dependanciesAmaury Sechet2016-02-051-0/+1
| | | | | | | | | | | | Summary: As per title. It is required and don't get linked in in some builds. Reviewers: chapuni, joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16903 llvm-svn: 259853
* ELF: Make names for TLS module indices shorter.Rui Ueyama2016-02-054-11/+13
| | | | | | | | | | The previous names contained "Local" and "Current", but what we are handling is always local and current, so they were redundant. TlsIndex comes from "tls_index" struct that Ulrich Drepper is using in this document to describe this data structure in GOT. llvm-svn: 259852
* Function name change /NFCXinliang David Li2016-02-041-2/+2
| | | | llvm-svn: 259851
* Add a little logging to ProcessMachCore so it is easier to tell when a user ↵Jason Molenda2016-02-041-3/+16
| | | | | | | | | | process dyld or mach kernel binary are found, and if there are multiples of them found within a single corefile. <rdar://problem/24446112> llvm-svn: 259850
* Simplify. NFC.Rui Ueyama2016-02-041-1/+1
| | | | llvm-svn: 259848
* Do not round uintX_t to uint32_t.Rui Ueyama2016-02-041-1/+1
| | | | | | On 64-bit computers, this value can be larger than UINT32_MAX. llvm-svn: 259847
* Refactor profile summary support code. NFC.Easwaran Raman2016-02-046-125/+168
| | | | | | | | | | Summary computation is not just for instrumented profiling and so I have moved the ProfileSummary class to ProfileCommon.h (named so to allow code unrelated to summary but common to instrumented and sampled profiling to be placed there) Differential Revision: http://reviews.llvm.org/D16661 llvm-svn: 259846
* Fix the search path for CMake filesNiels Ole Salscheider2016-02-041-4/+4
| | | | | | | This allows to find the LLVM's CMake files after moving them in r259821. llvm-svn: 259845
* Improve testing for the C APIAmaury Sechet2016-02-049-6/+520
| | | | | | | | | | | | | | | | | | | Summary: This basically add an echo test case in C. The support is limited right now, but full support would just be too much to review at once. The echo test case simply get a module as input and try to output the same exact module. This allow to check the both reading and writing API are working as expected. I want to improve this test over time to support more and more of the API, in order to improve coverage (coverage is quite poor right now). Test Plan: Run the test. Reviewers: chandlerc, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10725 llvm-svn: 259844
* Merge conditions of two nested `if`s.Rui Ueyama2016-02-041-6/+5
| | | | llvm-svn: 259843
* Fix the search path for CMake filesNiels Ole Salscheider2016-02-041-1/+1
| | | | | | | This allows to find the LLVM's CMake files after moving them in r259821. llvm-svn: 259842
* Fix the libdir suffix for LLVM_CMAKE_PATHNiels Ole Salscheider2016-02-041-1/+1
| | | | llvm-svn: 259841
* Fix for PR 26356Nemanja Ivanovic2016-02-042-5/+140
| | | | | | | | | Using the load immediate only when the immediate (whether signed or unsigned) can fit in a 16-bit signed field. Namely, from -32768 to 32767 for signed and 0 to 65535 for unsigned. This patch also ensures that we sign-extend under the right conditions. llvm-svn: 259840
* Fix typo and test commitEvandro Menezes2016-02-041-1/+1
| | | | llvm-svn: 259839
* Move the rest of the tests over to using the new decorator module.Zachary Turner2016-02-04343-803/+1246
| | | | llvm-svn: 259838
* PR25271: When attaching default template arguments to redeclarations of aRichard Smith2016-02-042-0/+28
| | | | | | | | | template, keep looking for default arguments if we see a template parameter pack. There may be default arguments preceding a pack with no default argument. Patch by Jannis Harder! llvm-svn: 259836
* Provide a test case for rl259798Nemanja Ivanovic2016-02-041-0/+10
| | | | llvm-svn: 259835
* Replace tabs with spaces for consistent indentation. No actual text changes.Adrian McCarthy2016-02-041-189/+189
| | | | llvm-svn: 259834
* Fix the search path for CMake filesNiels Ole Salscheider2016-02-041-1/+1
| | | | | | This fixes the build after moving LLVM's CMake files in r259821. llvm-svn: 259832
* Don't push relocation sections onto InputSection<ELFT>::Discarded.RelocSectionsSean Silva2016-02-043-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: LLVM3.3 (and earlier) would fail to include a relocation section in the group that the section it was relocating is in. Object files affected by this issue have been encountered in the wild when using LLD. This would result in a siutation like: Section { Index: 5 Name: .text._Z3fooIiEvv (6) Type: SHT_PROGBITS (0x1) Flags [ (0x206) SHF_ALLOC (0x2) SHF_EXECINSTR (0x4) SHF_GROUP (0x200) ] Address: 0x0 Offset: 0x48 Size: 5 Link: 0 Info: 0 AddressAlignment: 1 EntrySize: 0 } Section { Index: 6 Name: .rela.text._Z3fooIiEvv (1) Type: SHT_RELA (0x4) Flags [ (0x0) ] Address: 0x0 Offset: 0x3F0 Size: 24 Link: 8 Info: 5 AddressAlignment: 8 EntrySize: 24 } In LLD, during symbol resolution, we discard the section containing the weak symbol, but this amounts to replacing it with InputSection<ELFT>::Discarded. When we later saw the corresponding relocation section, we would then end up pusing onto InputSection<ELFT>::Discarded.RelocSections, which is bogus. Reviewers: ruiu, rafael Subscribers: llvm-commits, Bigcheese Differential Revision: http://reviews.llvm.org/D16898 llvm-svn: 259831
* Avoid code duplication when creating dynamic relocations.Rafael Espindola2016-02-043-143/+144
| | | | | | | | | | | | | | | | | Another case where we currently have almost duplicated code is the creation of dynamic relocations. First to decide if we need one, then to decide what to write. This patch fixes it by passing more information from the relocation scan to the section writing code. This is the same idea used for r258723. I actually think it should be possible to simplify this further by reordering things a bit in the writer. For example, we should be able to represent almost every position in the file with an OutputSeciton and offset. When writing it out we then just need to add the offset to the OutputSection VA. llvm-svn: 259829
* [AArch64] Bound the number of instructions we scan when searching for updates.Chad Rosier2016-02-041-14/+26
| | | | | | | This only impacts the creation of pre-/post-index instructions. The bound was set high enough such that it did not change code generation for SPEC200X. llvm-svn: 259828
* Set CPU_SUBTYPE_LIB64 in mach_header.Pete Cooper2016-02-042-1/+48
| | | | | | | | | | | On Mac OS 10.5 and later, with X86_64 and outputting a dynamic executable, ld64 set the CPU_SUBTYPE_LIB64 mask on the cpusubtype in the mach_header. This adds the same functionality to lld. rdar://problem/24507177 llvm-svn: 259826
* [docs] Fix typo in YamlIO.rstVedant Kumar2016-02-041-2/+3
| | | | | | Patch by Mario Lang! llvm-svn: 259825
* builtins: Fix struct __emutls_control to match GCCChih-Hung Hsieh2016-02-041-5/+9
| | | | | | | | | | | | | | The type of size and align in struct __emutls_control must be typedef unsigned int gcc_word __attribute__((mode(word))); to match GCC. When gcc_word is larger than size_t, which is the case for x32, the upper extra bits are all zeros. We can use variables of size_t to operate on size and align. Fix one trivial C99 warning about mixed declaration and code. Differential Revision: http://reviews.llvm.org/D16886 llvm-svn: 259824
* Revert "Use an artifical namespace so that member vars do not hide local vars."Siva Chandra2016-02-0412-409/+13
| | | | | | | | | | | | | | Summary: This reverts commit 8af14b5f9af68c31ac80945e5b5d56f0a14b38e4. Reverting as it breaks a few tests on Mac. Reviewers: spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16895 llvm-svn: 259823
* Install cmake files to lib/cmake/clangNiels Ole Salscheider2016-02-041-5/+5
| | | | | | | | This is the right location for platform-specific files. Also, search for LLVM's CMake files in this directory. llvm-svn: 259822
* Install cmake files to lib/cmake/llvmNiels Ole Salscheider2016-02-042-5/+5
| | | | | | | | | | | This is the right location for platform-specific files. On some distributions (e. g. Exherbo), a package can be installed for several architectures in parallel, but the architecture-independent files are shared. Therefore, we must not install architecture-dependent files (like the CMake config and export files) to share/. llvm-svn: 259821
* Fix a crash when there is a typo in the return statement.Manman Ren2016-02-042-0/+16
| | | | | | | | | | | | | | If the typo happens after a successful deduction for an earlier return statement, we should check if the deduced type is null before using it. The typo correction happens after we try to deduce the return type and we ignore the deduction from the typo and continue to typo correction. rdar://24342247 llvm-svn: 259820
* [PGO] code simplification: use existing VP annotation API /NFCXinliang David Li2016-02-041-27/+3
| | | | llvm-svn: 259819
* Make HostThread SetName work on OS X. GetName doesn't currently work, the ↵Jim Ingham2016-02-043-14/+11
| | | | | | | | | | | code that was in GetName actually got the queue name not the thread name and anyway didn't actually work to do that. So I just deleted it with a fixme. <rdar://problem/24487554> llvm-svn: 259818
* Add LIBOMP_ENABLE_SHARED option for CMakeJonathan Peyton2016-02-043-9/+38
| | | | | | | | | | | | | | | | When building executables for Cray supercomputers, statically-linked executables are preferred. This patch makes it possible to build the OpenMP runtime as an archive for building statically-linked executables. The patch adds the flag LIBOMP_ENABLE_SHARED, which defaults to true. When true, a build of the OpenMP runtime yields dynamic libraries. When false, a build of the OpenMP runtime yields static libraries. There is no setting that allows both kinds of libraries to be built. Patch by John Mellor-Crummey Differential Revision: http://reviews.llvm.org/D16525 llvm-svn: 259817
* [X86][SSE] Select domain for 32/64-bit partial loads for ↵Simon Pilgrim2016-02-049-103/+118
| | | | | | | | | | EltsFromConsecutiveLoads Choose between MOVD/MOVSS and MOVQ/MOVSD depending on the target vector type. This has a lot fewer test changes than trying to add this to X86InstrInfo::setExecutionDomain..... llvm-svn: 259816
* Fix a regression for r259736.Wei Mi2016-02-041-3/+10
| | | | | | | | | When SCEV expansion tries to reuse an existing value, it is needed to ensure that using the Value at the InsertPt will not break LCSSA. The fix adds a check that InsertPt is either inside the candidate Value's parent loop, or the candidate Value's parent loop is nullptr. llvm-svn: 259815
* Fix format in commentXinliang David Li2016-02-041-6/+4
| | | | llvm-svn: 259814
* [PGO] Add interfaces to annotate instr with VP dataXinliang David Li2016-02-043-7/+167
| | | | | | | Add interfaces to do value profile data IR annnotation and read. Needed by both FE and IR based PGO. llvm-svn: 259813
* [AArch64] Improve load/store optimizer to handle LDUR + LDR (take 3).Chad Rosier2016-02-042-21/+181
| | | | | | | | | | | | | | | This patch allows the mixing of scaled and unscaled load/stores to form load/store pairs. PR24465 http://reviews.llvm.org/D12116 Many thanks to Ahmed and Michael for fixes and code review. This is a reapplication of r246769 and r259790. The tramp3d failure was caused by an incorrect refactoring in the patch. Specifically, we weren't always properly clearing the SExtIdx flag. llvm-svn: 259812
* [PGO] cc1 option name change for profile instrumentationRong Xu2016-02-0470-86/+131
| | | | | | | | | | | | This patch changes cc1 option -fprofile-instr-generate to an enum option -fprofile-instrument={clang|none}. It also changes cc1 options -fprofile-instr-generate= to -fprofile-instrument-path=. The driver level option -fprofile-instr-generate and -fprofile-instr-generate= remain intact. This change will pave the way to integrate new PGO instrumentation in IR level. Review: http://reviews.llvm.org/D16730 llvm-svn: 259811
* Use an artifical namespace so that member vars do not hide local vars.Siva Chandra2016-02-0412-13/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While evaluating expressions when stopped in a class method, there was a problem of member variables hiding local variables. This was happening because, in the context of a method, clang already knew about member variables with their name and assumed that they were the only variables with those names in scope. Consequently, clang never checks with LLDB about the possibility of local variables with the same name and goes wrong. This change addresses the problem by using an artificial namespace "$__lldb_local_vars". All local variables in scope are declared in the "$__lldb_expr" method as follows: using $__lldb_local_vars::<local var 1>; using $__lldb_local_vars::<local var 2>; ... This hides the member variables with the same name and forces clang to enquire about the variables which it thinks are declared in $__lldb_local_vars. When LLDB notices that clang is enquiring about variables in $__lldb_local_vars, it looks up local vars and conveys their information if found. This way, member variables do not hide local variables, leading to correct evaluation of expressions. A point to keep in mind is that the above solution does not solve the problem for one specific case: namespace N { int a; } class A { public: void Method(); int a; }; void A::Method() { using N::a; ... // Since the above solution only touches locals, it does not // force clang to enquire about "a" coming from namespace N. } Reviewers: clayborg, spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16746 llvm-svn: 259810
* [SCEV] Add boolean accessors for NSW, NUW and NW; NFCSanjoy Das2016-02-042-14/+26
| | | | llvm-svn: 259809
* Move some of the common decorators to decorators.py.Zachary Turner2016-02-0434-278/+347
| | | | | | | | | | | | This doesn't attempt to move every decorator. The reason for this is that it requires touching every single test file to import decorators.py. I would like to do this in a followup patch, but in the interest of keeping the patches as bite-sized as possible, I've only attempted to move the underlying common decorators first. A few tests call these directly, so those tests are updated as part of this patch. llvm-svn: 259807
* Correctly handle {Always,Never}StepIntoLineDavid Majnemer2016-02-042-8/+10
| | | | llvm-svn: 259806
* Add support for S_DEFRANGE and S_DEFRANGE_SUBFIELDDavid Majnemer2016-02-042-2/+42
| | | | llvm-svn: 259805
* Make the dumper's output for variable ranges easier to readDavid Majnemer2016-02-041-24/+14
| | | | llvm-svn: 259804
* use 'auto' for iterators; NFCISanjay Patel2016-02-041-9/+3
| | | | llvm-svn: 259802
* [AArch64] Multiply extended 32-bit ints with `[U|S]MADDL'Silviu Baranga2016-02-042-0/+92
| | | | | | | | | | | | | | | | | | | | | | | During instruction selection, the AArch64 backend can recognise the following pattern and generate an [U|S]MADDL instruction, i.e. a multiply of two 32-bit operands with a 64-bit result: (mul (sext i32), (sext i32)) However, when one of the operands is constant, the sign extension gets folded into the constant in SelectionDAG::getNode(). This means that the instruction selection sees this: (mul (sext i32), i64) ...which doesn't match the pattern. Sign-extension and 64-bit multiply instructions are generated, which are slower than one 32-bit multiply. Add a pattern to match this and generate the correct instruction, for both signed and unsigned multiplies. Patch by Chris Diamand! llvm-svn: 259800
* The canonical way to XFAIL a test for all targets is XFAIL: *, not XFAIL:Benjamin Kramer2016-02-043-3/+3
| | | | | | | | Fix the lit bug that enabled this "feature" (empty triple is substring of all possible target triples) and change the two outliers to use the documented * syntax. llvm-svn: 259799
* Enable the %s modifier in inline asm template stringNemanja Ivanovic2016-02-041-0/+5
| | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D16847 There are some files in glibc that use the output operand modifier even though it was deprecated in GCC. This patch just adds support for it to prevent issues with such files. llvm-svn: 259798
* [PPC] Move PPC test to a PPC-specific dirRenato Golin2016-02-041-0/+0
| | | | llvm-svn: 259797
OpenPOWER on IntegriCloud