summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [GPGPU] Make sure escaping invariant load hoisted scalars are preservedTobias Grosser2017-10-042-1/+33
| | | | | | | | | | | | | | | We make sure that the final reload of an invariant scalar memory access uses the same stack slot into which the invariant memory access was stored originally. Earlier, this was broken as we introduce a new stack slot aside of the preload stack slot, which remained uninitialized and caused our escaping loads to contain garbage. This happened due to us clearing the pre-populated values in EscapeMap after kernel code generation. We address this issue by preserving the original host values and restoring them after kernel code generation. EscapeMap is not expected to be used during kernel code generation, hence we clear it during kernel generation to make sure that any unintended uses are noticed. llvm-svn: 314894
* [AVR] Insert JMP for long branchesDylan McKay2017-10-043-2/+4159
| | | | | | | | | | | Previously, on long branches (relative jumps of >4 kB), an assertion failure was hit, as AVRInstrInfo::insertIndirectBranch was not implemented. Despite its name, it is called by the branch relaxator for *all* unconditional jumps. Patch by Thomas Backman. llvm-svn: 314891
* [AVR] Fix displacement overflow for LDDW/STDWDylan McKay2017-10-043-5/+31
| | | | | | | | | | | | | | | | | | | In some cases, the code generator attempts to generate instructions such as: lddw r24, Y+63 which expands to: ldd r24, Y+63 ldd r25, Y+64 # Oops! This is actually ld r25, Y in the binary This commit limits the first offset to 62, and thus the second to 63. It also updates some asserts in AVRExpandPseudoInsts.cpp, including for INW and OUTW, which appear to be unused. Patch by Thomas Backman. llvm-svn: 314890
* [ELF] - Get rid of precompiled input objects from testcases.George Rimar2017-10-048-61/+54
| | | | | | | | | | | | | | We have verneed1.so, verneed2.so files and verneed.so.sh script to produce them. They were committed long time ago when LLD was not yet able to produce some sections for versioning (".gnu.version_r" I think). There is no point to have them as binaries anymore. Patch creates asm inputs instead based on verneed.so.sh content. Differential revision: https://reviews.llvm.org/D38505 llvm-svn: 314889
* [ARM] Add diag string for movw/movt immediates in assemblyOliver Stannard2017-10-043-2/+7
| | | | | | | | | This adds diagnostics for invalid immediate operands to the MOVW and MOVT instructions (ARM and Thumb). Differential revision: https://reviews.llvm.org/D31879 llvm-svn: 314888
* [ARM, Asm] Change grammar of immediate operand diagnosticsOliver Stannard2017-10-0413-66/+66
| | | | | | | | | | | | | | | | | Currently, our diagnostics for assembly operands are not consistent. Some start with (for example) "immediate operand must be ...", and some with "operand must be an immediate ...". I think the latter form is preferable for a few reasons: * It's unambiguous that it is referring to the expected type of operand, not the type the user provided. For example, the user could provide an register operand, and get a message taking about an operand is if it is already an immediate, just not in the accepted range. * It allows us to have a consistent style once we add diagnostics for operands that could take two forms, for example a label or pc-relative memory operand. Differential revision: https://reviews.llvm.org/D36689 llvm-svn: 314887
* [X86] Improvement in CodeGen instruction selection for LEAs (re-applying ↵Jatin Bhateja2017-10-0420-187/+639
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | post required revision changes.) Summary: 1/ Operand folding during complex pattern matching for LEAs has been extended, such that it promotes Scale to accommodate similar operand appearing in the DAG. e.g. T1 = A + B T2 = T1 + 10 T3 = T2 + A For above DAG rooted at T3, X86AddressMode will no look like Base = B , Index = A , Scale = 2 , Disp = 10 2/ During OptimizeLEAPass down the pipeline factorization is now performed over LEAs so that if there is an opportunity then complex LEAs (having 3 operands) could be factored out. e.g. leal 1(%rax,%rcx,1), %rdx leal 1(%rax,%rcx,2), %rcx will be factored as following leal 1(%rax,%rcx,1), %rdx leal (%rdx,%rcx) , %edx 3/ Aggressive operand folding for AM based selection for LEAs is sensitive to loops, thus avoiding creation of any complex LEAs within a loop. Reviewers: lsaba, RKSimon, craig.topper, qcolombet, jmolloy Reviewed By: lsaba Subscribers: jmolloy, spatel, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D35014 llvm-svn: 314886
* [llvm-cov] Fix showing title when filtering and not outputting to a directorySean Eveson2017-10-042-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D38507 llvm-svn: 314885
* [ELF] - Update after LLVM r314883 change. NFC.George Rimar2017-10-043-12/+4
| | | | llvm-svn: 314884
* [MC] - Don't assert when non-english characters are used.George Rimar2017-10-043-12/+42
| | | | | | | | | | | | | | | | | | I found that llvm-mc does not like non-english characters even in comments, which it tries to tokenize. Problem happens because of functions like isdigit(), isalnum() which takes int argument and expects it is not negative. But at the same time MCParser uses char* to store input buffer poiner, char has signed value, so it is possible to pass negative value to one of functions from above and that triggers an assert. Testcase for demonstration is provided. To fix the issue helper functions were introduced in StringExtras.h Differential revision: https://reviews.llvm.org/D38461 llvm-svn: 314883
* Recommit [UnreachableBlockElim] Use COPY if PHI input is undefMikael Holmen2017-10-042-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This time invoking llc with "-march=x86-64" in the testcase, so we don't assume the default target is x86. Summary: If we have %vreg0<def> = PHI %vreg2<undef>, <BB#0>, %vreg3, <BB#2>; GR32:%vreg0,%vreg2,%vreg3 %vreg3<def,tied1> = ADD32ri8 %vreg0<kill,tied0>, 1, %EFLAGS<imp-def>; GR32:%vreg3,%vreg0 then we can't just change %vreg0 into %vreg3, since %vreg2 is actually undef. We would have to also copy the undef flag to be able to change the register. Instead we deal with this case like other cases where we can't just replace the register: we insert a COPY. The code creating the COPY already copied all flags from the PHI input, so the undef flag will be transferred as it should. Reviewers: kparzysz Reviewed By: kparzysz Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38235 llvm-svn: 314882
* [IRCE] Temporarily disable unsigned latch conditions by defaultMax Kazantsev2017-10-047-5/+71
| | | | | | | | | | | | We have found some corner cases connected to range intersection where IRCE makes a bad thing when the latch condition is unsigned. The fix for that will go as a follow up. This patch temporarily disables IRCE for unsigned latch conditions until the issue is fixed. The unsigned latch conditions were introduced to IRCE by rL310027. Differential Revision: https://reviews.llvm.org/D38529 llvm-svn: 314881
* Revert r314879 "[UnreachableBlockElim] Use COPY if PHI input is undef"Mikael Holmen2017-10-042-41/+2
| | | | | | Build-bots broke on the new testcase. I'll investigate and fix. llvm-svn: 314880
* [UnreachableBlockElim] Use COPY if PHI input is undefMikael Holmen2017-10-042-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If we have %vreg0<def> = PHI %vreg2<undef>, <BB#0>, %vreg3, <BB#2>; GR32:%vreg0,%vreg2,%vreg3 %vreg3<def,tied1> = ADD32ri8 %vreg0<kill,tied0>, 1, %EFLAGS<imp-def>; GR32:%vreg3,%vreg0 then we can't just change %vreg0 into %vreg3, since %vreg2 is actually undef. We would have to also copy the undef flag to be able to change the register. Instead we deal with this case like other cases where we can't just replace the register: we insert a COPY. The code creating the COPY already copied all flags from the PHI input, so the undef flag will be transferred as it should. Reviewers: kparzysz Reviewed By: kparzysz Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38235 llvm-svn: 314879
* [XRay][compiler-rt] Fix logical failure in BufferQueue::getBuffer()Dean Michael Berris2017-10-041-1/+1
| | | | | | Follow-up to D38119. llvm-svn: 314878
* [XRay][compiler-rt] Use a hand-written circular buffer in BufferQueueDean Michael Berris2017-10-043-32/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change removes the dependency on using a std::deque<...> for the storage of the buffers in the buffer queue. We instead implement a fixed-size circular buffer that's resilient to exhaustion, and preserves the semantics of the BufferQueue. We're moving away from using std::deque<...> for two reasons: - We want to remove dependencies on the STL for data structures. - We want the data structure we use to not require re-allocation in the normal course of operation. The internal implementation of the buffer queue uses heap-allocated arrays that are initialized once when the BufferQueue is created, and re-uses slots in the buffer array as buffers are returned in order. We also change the lock used in the implementation to a spinlock instead of a blocking mutex. We reason that since the release operations now take very little time in the critical section, that a spinlock would be appropriate. This change is related to D38073. This change is a re-submit with the following changes: - Keeping track of the live buffers with a counter independent of the pointers keeping track of the extents of the circular buffer. - Additional documentation of what the data members are meant to represent. Reviewers: dblaikie, kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38119 llvm-svn: 314877
* [X86] Fix using the SJLJ jump table on x86_64Martin Storsjo2017-10-042-11/+82
| | | | | | | | | | | | | | | | The previous version didn't work if the jump table base address didn't fit in 32 bit, since it was encoded as an immediate offset. And in case the jump table is encoded as 32 bit label differences, we need to load and add them to the table base first. This solves the first half of the issues mentioned in PR34720. Also fix some of the errors pointed out by -verify-machineinstrs, by using GR32_NOSPRegClass. Differential Revision: https://reviews.llvm.org/D38333 llvm-svn: 314876
* [XRay] [compiler-rt] make sure single threaded programs get traced tooMartin Pelikan2017-10-042-0/+47
| | | | | | | | | | | | | | | Summary: When the XRay user calls the API to finish writing the log, the thread which is calling the API still hasn't finished and therefore won't get its trace written. Add a test for only the main thread to check this. Reviewers: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38493 llvm-svn: 314875
* Move verbosity check for remarks to the diag handlerAdam Nemet2017-10-043-8/+10
| | | | | | | | Test needs some slight adjustment because we no longer check the existence of BFI but rather that the actual hotness is set on the remark. If entry_count is not set getBlockProfileCount returns None. llvm-svn: 314874
* Move verbosity check for opt remarks to the diag handler.Adam Nemet2017-10-041-0/+4
| | | | llvm-svn: 314873
* We allow implicit function declarations as an extension in all C dialects. ↵Richard Smith2017-10-044-10/+6
| | | | | | Remove OpenCL special case. llvm-svn: 314872
* PR34822: Fix a collection of related bugs with our handling of C89 implicit ↵Richard Smith2017-10-045-23/+49
| | | | | | | | | | | | | | | | | function declarations. We were injecting the function into the wrong semantic context, resulting in it failing to be registered as a global for redeclaration lookup. As a consequence, we accepted invalid code since r310616. Fixing that resulted in the "out-of-scope declaration" diagnostic firing a lot more often. It turned out that warning codepath was non-conforming, because it did not cause us to inject the implicitly-declared function into the enclosing block scope. We now only warn if the type of the out-of-scope declaration doesn't match the type of an implicitly-declared function; in all other cases, we produce the normal warning for an implicitly-declared function. llvm-svn: 314871
* [FuzzerUtil] Partially revert D38481 on FuzzerUtilTim Shen2017-10-041-1/+9
| | | | | | | | | This is because lib/Fuzzer doesn't really depend on llvm infrastucture. It's not easy to access the llvm hardware_concurrency here. Differential Reivision: https://reviews.llvm.org/D38481 llvm-svn: 314870
* Call exitLld() from elf::link.Rui Ueyama2017-10-042-6/+7
| | | | | | | | | We used to call exitLld() from a leaf function, Writer::run(), because we had objects on the stack whose dtors are expensive. Now we no longer have such objects on the stack, so there's no reason to exist from the leaf function. llvm-svn: 314869
* [ELF] Fix buildbotsShoaib Meenai2017-10-041-1/+1
| | | | | | Mark a test as requiring zlib. llvm-svn: 314868
* Remove BssSection::reserveSpace().Rui Ueyama2017-10-044-16/+10
| | | | | | | We no longer call reserveSpace more than once, so it can be merged with its constructor. llvm-svn: 314867
* [ELF] Decompress debug info sections earlyShoaib Meenai2017-10-045-6/+41
| | | | | | | | | | | | | | | | | | When reporting a symbol conflict, LLD parses the debug info to report source location information. Sections have not been decompressed at this point, so if an object file contains zlib compressed debug info, LLD ends up passing this compressed debug info to the DWARF parser, which causes debug info parsing failures and can trigger assertions in the parser (as the test case demonstrates). Decompress debug sections when constructing the LLDDwarfObj to avoid this issue. This doesn't handle GNU-style compressed debug info sections (.zdebug_*), which at present are simply ignored by LLDDwarfObj; those can be done in a follow-up. Differential Revision: https://reviews.llvm.org/D38491 llvm-svn: 314866
* [ExprConstant] Allow constexpr ctor to modify non static data membersErik Pilkington2017-10-042-3/+63
| | | | | | | | Fixes PR19741. Differential revision: https://reviews.llvm.org/D38483 llvm-svn: 314865
* Add C++17 explicit deduction guides to std::pair.Eric Fiselier2017-10-044-4/+90
| | | | | | | This patch adds the newly standardized deduction guides for std::pair, allowing it to work class template deduction. llvm-svn: 314864
* Add a manpage for llvm-dwarfdump.Adrian Prantl2017-10-032-11/+119
| | | | llvm-svn: 314863
* Add a note on where to get a lld benchmark.Rafael Espindola2017-10-031-0/+9
| | | | llvm-svn: 314862
* [Analyzer] Re-apply r314820 with a fix for StringRef lifetime.George Karpenkov2017-10-032-3/+13
| | | | | | | | | Fixes the test failure: temporary is now bound to std::string, tests fully pass on Linux. This reverts commit b36ee0924038e1d95ea74230c62d46e05f80587e. llvm-svn: 314859
* Simplify multikey_qsort function.Rui Ueyama2017-10-031-24/+20
| | | | | | | This function implements the three-way radix quicksort algorithm. This patch simplifies the implementation by using MutableArrayRef. llvm-svn: 314858
* [AArch64] Use LateSimplifyCFG after expanding atomic operations.Balaram Makam2017-10-033-4/+64
| | | | | | | | | | | | | | | | | Summary: After r308422 we defer optimizations that can destroy loop canonical forms to LateSimplifyCFG. Running LateSimplifyCFG after expanding atomic operations can exploit more control-flow opportunities. Reviewers: mcrosier, t.p.northover, efriedma Reviewed By: efriedma Subscribers: aemerson, rengolin, javed.absar, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D38262 llvm-svn: 314857
* updating svn:ignoreLeonard Mosescu2017-10-030-0/+0
| | | | llvm-svn: 314856
* llvm-dwarfdump: implement the --regex option in combination with --name.Adrian Prantl2017-10-033-9/+49
| | | | llvm-svn: 314855
* [CMake] Minor updates to Apple CMake cachesChris Bieneman2017-10-032-0/+11
| | | | | | | * Turn off embedded compiler-rt builds in stage1 * Support generating Xcode toolchains from Stage2 build configurations llvm-svn: 314854
* AMDGPU: Expand setcc for v2f32 and v4f32Konstantin Zhuravlyov2017-10-031-0/+1
| | | | llvm-svn: 314853
* AMDGPU: Expand setcc for v2i32 and v4i32Konstantin Zhuravlyov2017-10-032-0/+53
| | | | llvm-svn: 314852
* [compiler-rt] Add back ARM EABI aliases where legal.Eli Friedman2017-10-0340-82/+145
| | | | | | | | | | | | | | r303188 removed all the uses of aliases for EABI functions from compiler-rt, because some of them had mismatched calling conventions. Obviously, we can't use aliases for functions which don't have the same calling convention, but that's only an issue for floating-point functions with the hardfloat ABI. In other cases, the stubs increase size and reduce performance for no benefit. This patch adds back the aliases, with appropriate checks to make sure they're only used in cases where the calling convention matches. llvm-svn: 314851
* UnXFAIL tests that previously failed VerifyDFSNumbersJakub Kuderski2017-10-032-6/+0
| | | | | | They started passing again by the DT::eraseNode fix in r314847. llvm-svn: 314850
* cmake + xcode: prevent gtests from using includes from project rootTim Hammerquist2017-10-0317-37/+36
| | | | | | | | | | | | | | | | | | | | | Summary: At present, several gtests in the lldb open source codebase are using #include statements rooted at $(SOURCE_ROOT)/${LLDB_PROJECT_ROOT}. This patch cleans up this directory/include structure for both CMake and Xcode build systems. rdar://problem/33835795 Reviewers: zturner, jingham, beanz Reviewed By: beanz Subscribers: emaste, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D36598 llvm-svn: 314849
* AMDGPU/Docs: Follow up on review feedback in https://reviews.llvm.org/D38387Konstantin Zhuravlyov2017-10-031-2/+2
| | | | llvm-svn: 314848
* [Dominators] Make eraseNode invalidate DFS numbersJakub Kuderski2017-10-031-2/+3
| | | | | | | | | | This patch makes DT::eraseNode mark DFSInfo as invalid. Not marking it as invalid leads to DFS numbers getting corrupted and failing VerifyDFSNumbers check. This patch also makes children iterator const (NFC). llvm-svn: 314847
* AMDGPU: Add ELFOSABI_AMDGPU_MESA3DKonstantin Zhuravlyov2017-10-035-40/+74
| | | | | | Differential Revision: https://reviews.llvm.org/D38387 llvm-svn: 314846
* [X86] Remove dead declaration convertArgMovsToPushes, NFCReid Kleckner2017-10-031-9/+0
| | | | | | | | This was dead when it landed in r252578. We have this functionality, if not for stack probe calls, but for regular calls in X86CallFrameOptimization.cpp. llvm-svn: 314845
* Pre-compute the tail of the archiveRafael Espindola2017-10-031-177/+184
| | | | | | | | | | | | | | | | | | | | | | | | An archive looks like <header> <symbol table> <tail> The symbol table refers to offsets in the tail. A complication is that we would like to support symbol tables that use 64 bit offsets if it turns out that any of the offsets is too big. This patch changes the archive writer to first compute the tail. We cannot just compute one big StringRef since that would require reading every member upfront, but we can represent it as a series of StringRefs. Having done that it is much easier to compute the symbol table and all offsets are computed before it is written. With this if there is an accounting problem it will show up with a regular symbol table, not just when a 64 bit one is needed. llvm-svn: 314844
* AMDGPU: Add ELFOSABI_AMDGPU_PALKonstantin Zhuravlyov2017-10-039-26/+65
| | | | llvm-svn: 314843
* Move fetchIfLazy up so that the following comment makes sense.Rui Ueyama2017-10-031-4/+4
| | | | | | | | | | | | We have this comment in LinkerDriver::link After this, no new names except a few linker-synthesized ones will be added to the symbol table. but that was not true because new symbols could be added by processing the -u option. llvm-svn: 314842
* Inline a small function.Rui Ueyama2017-10-033-13/+2
| | | | llvm-svn: 314841
OpenPOWER on IntegriCloud