summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* [X86][SSE] Add general 32-bit LOAD + VZEXT_MOVL support to ↵Simon Pilgrim2016-02-045-150/+75
| | | | | | | | | | EltsFromConsecutiveLoads This patch adds support for consecutive (load/undef elements) 32-bit loads, followed by trailing undef/zero elements to be combined to a single MOVD load. Differential Revision: http://reviews.llvm.org/D16729 llvm-svn: 259796
* Revert "[AArch64] Improve load/store optimizer to handle LDUR + LDR."Chad Rosier2016-02-042-182/+22
| | | | | | This reverts commit r259790. tramp3d-v4 is still having problems. llvm-svn: 259795
* [X86][SSE] Added i686 target tests to make sure we are correctly loading ↵Simon Pilgrim2016-02-043-0/+504
| | | | | | consecutive entries as 64-bit integers llvm-svn: 259794
* Provide arguments for all the format string placeholders!Adrian McCarthy2016-02-041-1/+1
| | | | | | Log message was wrong because an argument was missing. llvm-svn: 259793
* AVX-512: Fixed a bug in FMA instruction selection on KNLElena Demikhovsky2016-02-044-15/+16
| | | | | | | | The FMA instruction was selected from AVX2 set instead of AVX-512 Differential Revision: http://reviews.llvm.org/D16884 llvm-svn: 259792
* [Power PC] softening long double typePetar Jovanovic2016-02-044-26/+260
| | | | | | | | | | | This patch implements softening of long double type (ppcf128) on ppc32 architecture and enables operations for this type for soft float. Patch by Strahinja Petrovic. Differential Revision: http://reviews.llvm.org/D15811 llvm-svn: 259791
* [AArch64] Improve load/store optimizer to handle LDUR + LDR.Chad Rosier2016-02-042-22/+182
| | | | | | | | | | | | | | 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, which was reverted in r246782 due to a test-suite failure. I'm unable to reproduce the issue at this time. llvm-svn: 259790
* [AVX512] add vfmadd132ss and vfmadd132sd IntrinsicMichael Zuckerman2016-02-045-11/+265
| | | | | | Differential Revision: http://reviews.llvm.org/D16589 llvm-svn: 259789
* [clang-tidy] More friendly warning in "google-runtime-references" when ↵Haojian Wu2016-02-042-5/+12
| | | | | | | | | | | | meeting an unnamed function parameter. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16882 llvm-svn: 259787
* [X86] Add AVX512 vector zext testsSimon Pilgrim2016-02-041-0/+122
| | | | llvm-svn: 259786
* Support accesses with differently sized types to the same arrayTobias Grosser2016-02-0419-138/+783
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows code such as: void multiple_types(char *Short, char *Float, char *Double) { for (long i = 0; i < 100; i++) { Short[i] = *(short *)&Short[2 * i]; Float[i] = *(float *)&Float[4 * i]; Double[i] = *(double *)&Double[8 * i]; } } To model such code we use as canonical element type of the modeled array the smallest element type of all original array accesses, if type allocation sizes are multiples of each other. Otherwise, we use a newly created iN type, where N is the gcd of the allocation size of the types used in the accesses to this array. Accesses with types larger as the canonical element type are modeled as multiple accesses with the smaller type. For example the second load access is modeled as: { Stmt_bb2[i0] -> MemRef_Float[o0] : 4i0 <= o0 <= 3 + 4i0 } To support code-generating these memory accesses, we introduce a new method getAccessAddressFunction that assigns each statement instance a single memory location, the address we load from/store to. Currently we obtain this address by taking the lexmin of the access function. We may consider keeping track of the memory location more explicitly in the future. We currently do _not_ handle multi-dimensional arrays and also keep the restriction of not supporting accesses where the offset expression is not a multiple of the access element type size. This patch adds tests that ensure we correctly invalidate a scop in case these accesses are found. Both types of accesses can be handled using the very same model, but are left to be added in the future. We also move the initialization of the scop-context into the constructor to ensure it is already available when invalidating the scop. Finally, we add this as a new item to the 2.9 release notes Reviewers: jdoerfert, Meinersbur Differential Revision: http://reviews.llvm.org/D16878 llvm-svn: 259784
* [ScheduleDagInstrs] Improved commentsJonas Paulsson2016-02-041-9/+9
| | | | llvm-svn: 259783
* [ELF][MIPS] Support R_MIPS_PC32 relocation handlingSimon Atanasyan2016-02-042-11/+23
| | | | llvm-svn: 259782
* [ELF][MIPS] Add handling for __gnu_local_gp symbolSimon Atanasyan2016-02-045-1/+25
| | | | | | | This symbol is a "fake" symbol like "_gp_disp" and denotes the GOT + 0x7FF0 value. llvm-svn: 259781
* [x86] Correct setting of WIntType for MCU targetAndrey Bokhanko2016-02-042-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D16626 llvm-svn: 259780
* [ELF][MIPS] Replace needsMipsLocalGot function by canBePreemptedSimon Atanasyan2016-02-044-22/+7
| | | | | | | Symbol does not need an entry i the 'global' part of GOT if it cannot be preempted. So canBePreempted fully satisfies us at least for now. llvm-svn: 259779
* [ELF][MIPS] Always create global GOT entry for symbols defined in DSOSimon Atanasyan2016-02-042-3/+62
| | | | | | | | | | If relocation against symbol requires GOT entry creation and this symbol is defined in DSO, the GOT entry should be created in the 'global' part of the GOT even if we link executable file. Also we do not need to create a dynamic symbol table entry for global symbol corresponding to the local GOT entry. llvm-svn: 259778
* Enable test_lldbmi_settings_set_target_run_args_before on linuxPavel Labath2016-02-041-1/+0
| | | | | | Test has passed last 200 runs of the build bot. llvm-svn: 259777
* [OPENMP 4.0] Fixed support of array sections/array subscripts.Alexey Bataev2016-02-0410-116/+353
| | | | | | Codegen for array sections/array subscripts worked only for expressions with arrays as base. Patch fixes codegen for bases with pointer/reference types. llvm-svn: 259776
* Mark TestProcessIO as flaky on androidPavel Labath2016-02-041-1/+5
| | | | | | | previously, I have marked only one test as flaky, but now I noticed another test failing with the same error. I am going to assume all of them are flaky. llvm-svn: 259775
* Add verbose logging support to gdb-remote testsPavel Labath2016-02-041-7/+39
| | | | | | | | | | | | | | | | | | Summary: gdb-remote tests are not able to use the same logging mechanisms as the rest of our tests, and currently we get no host logs from them, even though the tests themselves have logging capability. This commit changes that. When user specifies that he would like to log the gdb-remote channel (--channel gdb-remote argument to dotest.py), we write detailed logs to the <TEST_ID>-host.log file, just like we would in the case of regular tests. If this argument is not specified, we only log the serious messages to stderr, which matches the existing behaviour. Reviewers: tfiala, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16858 llvm-svn: 259774
OpenPOWER on IntegriCloud