1. Apr 23, 2019
    • Lewis Revill's avatar
      [RISCV] Support assembling %tls_{ie,gd}_pcrel_hi modifiers · df3cb477
      Lewis Revill authored
      This patch adds support for parsing and assembling the %tls_ie_pcrel_hi
      and %tls_gd_pcrel_hi modifiers.
      
      Differential Revision: https://reviews.llvm.org/D55342
      
      llvm-svn: 358994
      df3cb477
    • Nico Weber's avatar
      gn build: Merge r358944 · 9fc42283
      Nico Weber authored
      llvm-svn: 358993
      9fc42283
    • Scott Linder's avatar
      [AMDGPU] Fix hidden argument metadata duplication for V3 · 3eed9619
      Scott Linder authored
      Essentially complete a proper rebase of the V3 metadata change over
      https://reviews.llvm.org/D49096.
      
      Minimize the diff between the V2 and V3 variants of the relevant lit
      tests, and clean up some trailing whitespace.
      
      llvm-svn: 358992
      3eed9619
    • Nico Weber's avatar
      gn build: Merge r358949 · d7a748a7
      Nico Weber authored
      llvm-svn: 358991
      d7a748a7
    • George Rimar's avatar
      [LLD][ELF] - Remove dynamic-section-sh_size.elf binary, convert test to yaml. NFCI. · bb2079b7
      George Rimar authored
      dynamic-section-sh_size.elf was introduced in D25090.
      Now it is possible to use yaml2obj instead. 
      That is what this patch does.
      
      Also I added one more case of a possibly broken .dynamic
      section just in case.
      
      llvm-svn: 358990
      bb2079b7
    • Simon Pilgrim's avatar
      [X86] Pull out collectConcatOps helper. NFCI. · 0e4992ce
      Simon Pilgrim authored
      Create collectConcatOps helper that returns all the subvector ops for CONCAT_VECTORS or a INSERT_SUBVECTOR series.
      
      llvm-svn: 358989
      0e4992ce
    • Louis Dionne's avatar
      [libc++] Remove redundant conditionals for Apple platforms · d524fe5b
      Louis Dionne authored
      Summary:
      In a bunch of places, we used to check whether LIBCXX_BUILDING_LIBCXXABI
      is defined OR we're building for an Apple platform. This used to
      be necessary in a time when Apple's build script did NOT define
      LIBCXX_BUILDING_LIBCXXABI. However this is not relevant anymore
      since Apple's build does define LIBCXX_BUILDING_LIBCXXABI.
      
      Reviewers: EricWF
      
      Subscribers: christof, jkorous, dexonsmith, libcxx-commits
      
      Tags: #libc
      
      Differential Revision: https://reviews.llvm.org/D60842
      
      llvm-svn: 358988
      d524fe5b
    • Tim Northover's avatar
      ARM: disallow add/sub to sp unless Rn is also sp. · 6af366be
      Tim Northover authored
      The manual says that Thumb2 add/sub instructions are only allowed to modify sp
      if the first source is also sp. This is slightly different from the usual rGPR
      restriction since it's context-sensitive, so implement it in C++.
      
      llvm-svn: 358987
      6af366be
    • Roman Lebedev's avatar
      [Docs] ReleaseNotes: fixup markup in memcmp()->bcmp() entry · a6be919c
      Roman Lebedev authored
      llvm-svn: 358986
      a6be919c
    • George Rimar's avatar
      [LLD][ELF] - Remove file-class.a binary from inputs and improve the test case. · 95203efc
      George Rimar authored
      file-class.a was used to diagnose the "corrupted ELF file: invalid file class"
      error when the object was fetched from the archive.
      
      file-class.a contained an object of 16 bytes size. I replaced it with
      an echo call (because it is impossible to use yaml2obj for that, and I am
      not sure it is worth to support), and also increased its size to 18 bytes.
      That allowed to also test a case when such object is a regular input and not an
      archive member (we have a bit different logic for these cases).
      
      llvm-svn: 358985
      95203efc
    • Sanjay Patel's avatar
      [DAGCombiner] generalize binop-of-splats scalarization · 06ff5eae
      Sanjay Patel authored
      If we only match build vectors, we can miss some patterns
      that use shuffles as seen in the affected tests.
      
      Note that the underlying calls within getSplatSourceVector()
      have the potential for compile-time explosion because of
      exponential recursion looking through binop opcodes, but
      currently the list of supported opcodes is very limited.
      Both of those problems should be addressed in follow-up
      patches.
      
      llvm-svn: 358984
      06ff5eae
    • Nicolai Haehnle's avatar
      AMDGPU: Fix LCSSA phi lowering in SILowerI1Copies · 7edae4c4
      Nicolai Haehnle authored
      Summary:
      When an LCSSA phi survives through instruction selection, the pass
      ends up removing that phi entirely because it is dominated by the
      logic that does the lanemask merging.
      
      This then used to trigger an assertion when processing a dependent
      phi instruction.
      
      Change-Id: Id4949719f8298062fe476a25718acccc109113b6
      
      Reviewers: llvm-commits
      
      Subscribers: kzhuravl, jvesely, wdng, yaxunl, t-tye, tpr, dstuttard, rtaylor, arsenm
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60999
      
      llvm-svn: 358983
      7edae4c4
    • Fedor Sergeev's avatar
      [CallSite removal] move InlineCost to CallBase usage · 652168a9
      Fedor Sergeev authored
      Converting InlineCost interface and its internals into CallBase usage.
      Inliners themselves are still not converted.
      
      Reviewed By: reames
      Tags: #llvm
      Differential Revision: https://reviews.llvm.org/D60636
      
      llvm-svn: 358982
      652168a9
    • Andrew Ng's avatar
      [ELF] Change default output section type to SHT_PROGBITS · ccba42c7
      Andrew Ng authored
      This fixes an issue where a symbol only section at the start of a
      PT_LOAD segment, causes incorrect alignment of the file offset for the
      start of the segment which results in the output of an invalid ELF.
      
      SHT_PROGBITS was the default output section type in the past.
      
      Differential Revision: https://reviews.llvm.org/D60131
      
      llvm-svn: 358981
      ccba42c7
    • Alexandre Ganea's avatar
      [LLD][COFF] Fix /linkrepro with output options that take a filename or path · 2769d586
      Alexandre Ganea authored
      The following options: /pdb, /out or /implib now emit in the repro.tar/response.txt only a filename stripped from its path, to avoid non-existent paths on the reproducer's machine.
      
      Differential Revision: https://reviews.llvm.org/D59530
      
      llvm-svn: 358980
      2769d586
    • Andrew Ng's avatar
      [ELF] Change findOrphanPos to only consider live sections · 98c858a2
      Andrew Ng authored
      This patch changes the behaviour of findOrphanPos to only consider live
      sections when placing orphan sections. This used to be how it behaved in
      the past.
      
      Differential Revision: https://reviews.llvm.org/D60273
      
      llvm-svn: 358979
      98c858a2
    • Aaron Ballman's avatar
      Removing the explicit specifier from some default constructors; NFC. · 61ef9193
      Aaron Ballman authored
      llvm-svn: 358978
      61ef9193
    • David Green's avatar
      [ARM] Update check for CBZ in Ifcvt · c519d3c4
      David Green authored
      The check for creating CBZ in constant island pass recently obtained the
      ability to search backwards to find a Cmp instruction. The code in IfCvt should
      mirror this to allow more conversions to the smaller form. The common code has
      been pulled out into a separate function to be shared between the two places.
      
      Differential Revision: https://reviews.llvm.org/D60090
      
      llvm-svn: 358977
      c519d3c4
    • Pavel Labath's avatar
      Move postfix expression code out of the NativePDB plugin · 4eda12ae
      Pavel Labath authored
      Summary:
      The NativePDB plugin contains code to convert "programs" describing the
      layout of function frames into dwarf (for easier interaction with the
      rest of lldb). This functionality is useful for the Breakpad plugin too,
      as it contains the same kind of expressions (because breakpad info is
      generated from pdb files).
      
      In this patch, I move the core classes of this code into a common place,
      where it can be used from both files. Previously, these were the details
      of the implementation, but here I am exposing them (instead of just a
      single "string->string" conversion function), as breakpad will need to
      use these in a slightly different way. The reason for that is that
      breakpad files generated from dwarf expressions use a slightly different
      syntax, although most of the core code can be reused with a bit of
      thought.
      
      This is also the reason why I am not moving the parsing or dwarf
      generation bits, as they will need to be generalized a bit before
      they're usable for both scenarios.
      
      This patch should be NFC, modulo renaming the moved entities to more
      neutral names.
      
      The reason I am moving this to the "Symbol" library, is because both
      customers will be "Symbol"Files, and also the unwinding code lives in
      the Symbol library. From a purely dependency standpoint this code will
      probably be standalone, and so it could be moved all the way to Utility,
      but that seems too low for this kind of functionality.
      
      Reviewers: jasonmolenda, amccarth, clayborg, JDevlieghere, aleksandr.urakov
      
      Subscribers: aprantl, markmentovai, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D60599
      
      llvm-svn: 358976
      4eda12ae
    • Fangrui Song's avatar
      [PPC][PPC64] Improve some llvm-objdump -d -D tests · 003c18a3
      Fangrui Song authored
      Various improvement:
      
      Some offsets in disassembly are incorrect after several layout adjustment. Fix them.
      llvm-objdump -D should not be used. -D dumps unrelated non-text sections. Replace them with llvm-objdump -d, llvm-readelf -x, etc
      Many llvm-objdump -d tests use {{.*}} . Add the option --no-show-raw-insn to avoid check hex bytes.
      
      ppc64-long-branch.s does not need a shared object. Delete it.
      Make ppc64-ifunc.s check 2 ifuncs.
      
      Reviewers: ruiu, espindola
      
      Subscribers: emaste, nemanjai, arichardson, kbarton, jsji, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60998
      
      llvm-svn: 358975
      003c18a3
    • David Green's avatar
      [ARM] Don't replicate instructions in Ifcvt at minsize · 2f9eed62
      David Green authored
      Ifcvt can replicate instructions as it converts them to be predicated. This
      stops that from happening on thumb2 targets at minsize where an extra IT
      instruction is likely needed.
      
      Differential Revision: https://reviews.llvm.org/D60089
      
      llvm-svn: 358974
      2f9eed62
    • Simon Pilgrim's avatar
      Fix "-Wimplicit-fallthrough" warning. NFCI. · 6b182508
      Simon Pilgrim authored
      llvm-svn: 358973
      6b182508
    • George Rimar's avatar
      [LLD][ELF] - Fix mips-invalid-options-descriptor.s test case and convert to YAML. · 6684a351
      George Rimar authored
      It was initially introduced in D25229 to report the "zero option descriptor size"
      error message. In following commits it was broken and did not report this
      error anymore. I think that happened because elf object was a result of fuzzing
      and it was broken in many ways.
      
      This patch converts this test to a YAML, removes a binary and hence fixes the
      original intention.
      
      llvm-svn: 358972
      6684a351
    • Adam Balogh's avatar
      [Analyzer] Second fix for last commit for IteratorChecker · d2e2e20d
      Adam Balogh authored
      A variable was redeclared instead of assigned in an internal
      block, leaving the original uninitialized. This is fixed now.
      
      llvm-svn: 358971
      d2e2e20d
    • Simon Pilgrim's avatar
      ddd225d1
    • Simon Pilgrim's avatar
      e7a68fd9
    • Rafael Stahl's avatar
      [analyzer][CrossTU] Extend CTU to VarDecls with initializer · 850361f6
      Rafael Stahl authored
      Summary:
      The existing CTU mechanism imports `FunctionDecl`s where the definition is available in another TU. This patch extends that to VarDecls, to bind more constants.
      
      - Add VarDecl importing functionality to CrossTranslationUnitContext
      - Import Decls while traversing them in AnalysisConsumer
      - Add VarDecls to CTU external mappings generator
      - Name changes from "external function map" to "external definition map"
      
      Reviewers: NoQ, dcoughlin, xazax.hun, george.karpenkov, martong
      
      Reviewed By: xazax.hun
      
      Subscribers: Charusso, baloghadamsoftware, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, george.karpenkov, mgorny, whisperity, szepet, rnkovacs, a.sidorin, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D46421
      
      llvm-svn: 358968
      850361f6
    • Pavel Labath's avatar
      modify-python-lldb: Remove \a-removing code · 330bc8af
      Pavel Labath authored
      instead, remove \a directly from the interface files.
      
      llvm-svn: 358967
      330bc8af
    • George Rimar's avatar
      [LLD][ELF] - Remove multiple-eh-relocs.elf binary from the inputs. NFCI. · b7dc13f4
      George Rimar authored
      Introduced multiple-relocations-sections.test based on YAML instead.
      
      llvm-svn: 358966
      b7dc13f4
    • Bjorn Pettersson's avatar
      [DAGCombiner] Combine OR as ADD when no common bits are set · f97b29be
      Bjorn Pettersson authored
      Summary:
      The DAGCombiner is rewriting (canonicalizing) an ISD::ADD
      with no common bits set in the operands as an ISD::OR node.
      
      This could sometimes result in "missing out" on some
      combines that normally are performed for ADD. To be more
      specific this could happen if we already have rewritten an
      ADD into OR, and later (after legalizations or combines)
      we expose patterns that could have been optimized if we
      had seen the OR as an ADD (e.g. reassociations based on ADD).
      
      To make the DAG combiner less sensitive to if ADD or OR is
      used for these "no common bits set" ADD/OR operations we
      now apply most of the ADD combines also to an OR operation,
      when value tracking indicates that the operands have no
      common bits set.
      
      Reviewers: spatel, RKSimon, craig.topper, kparzysz
      
      Reviewed By: spatel
      
      Subscribers: arsenm, rampitec, lebedev.ri, jvesely, nhaehnle, hiraditya, javed.absar, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D59758
      
      llvm-svn: 358965
      f97b29be
    • Pavel Labath's avatar
      FuncUnwinders: remove "current_offset" from function arguments · 23594291
      Pavel Labath authored
      Summary:
      This argument was added back in 2010 (r118882) to support the ability to unwind
      from functions whose eh_frame entry does not cover the entire range of
      the function.
      
      However, due to the caching happening in FuncUnwinders, this solution is
      very fragile. FuncUnwinders will cache the plan it got from eh_frame
      regardless of the value of the current_offset, so our ability to unwind
      from a given function depended what was the value of "current_offset" the
      first time that this function was called.
      
      Furthermore, since the "image show-unwind" command did not know what's
      the right offset to pass, this created an unfortunate situation where
      "image show-unwind" would show no valid plans for a function, even
      though they were available and being used.
      
      In this patch I implement the feature slightly differently. Instead of
      giving just a base address to the eh_frame unwinder, I give it the
      entire range we are interested in. Then, I change the unwinder to return
      the first plan that covers (even partially) that range. This way even a
      partial plan will be returned, regardless of the address in the function
      where we are stopped at.
      
      This solution is still not 100% correct, as it will not handle a
      function which is covered by two independent fde entries. However, I
      don't expect anybody will write this kind of functions, and this wasn't
      handled by the previous implementation either. If this is ever needed in
      the future. The eh_frame unwinder can be extended to return "composite"
      unwind plans created by merging sevelar fde entries.
      
      I also create a test which triggers this scenario. As doing this is
      virtually impossible without hand-written assembly, the test only works
      on x86 linux.
      
      Reviewers: jasonmolenda, clayborg
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D60829
      
      llvm-svn: 358964
      23594291
    • Javed Absar's avatar
      [AArch64] Add support for MTE intrinsics · 1cdc3dbc
      Javed Absar authored
      This patch provides intrinsics support for Memory Tagging Extension (MTE),
      which was introduced with the Armv8.5-a architecture.
      The intrinsics are described in detail in the latest
      ACLE Q1 2019 documentation: https://developer.arm.com/docs/101028/latest
      Reviewed by: David Spickett
      Differential Revision: https://reviews.llvm.org/D60486
      
      llvm-svn: 358963
      1cdc3dbc
    • Diogo N. Sampaio's avatar
      [ARM][FIX] Add missing f16.lane.vldN/vstN lowering · 2619f399
      Diogo N. Sampaio authored
      Summary:
      Add missing D and Q lane VLDSTLane lowering
      for fp16 elements.
      
      Reviewers: efriedma, kosarev, SjoerdMeijer, ostannard
      
      Reviewed By: efriedma
      
      Subscribers: javed.absar, kristof.beyls, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60874
      
      llvm-svn: 358962
      2619f399
    • George Rimar's avatar
      [LLD][ELF] - Update test case after llvm-mc change. · 545f621a
      George Rimar authored
      rL358960 "[llvm-mc] - Properly set the the address align field of the compressed sections."
      changed the sh_addralign field of the "zlib" compressed debug sections.
      
      llvm-svn: 358961
      545f621a
    • George Rimar's avatar
      [llvm-mc] - Properly set the the address align field of the compressed sections. · b9ed9cb5
      George Rimar authored
      About the compressed sections spec says:
      (https://docs.oracle.com/cd/E37838_01/html/E36783/section_compression.html)
      sh_addralign fields of the section header for a compressed section
      reflect the requirements of the compressed section.
      
      Currently, llvm-mc always puts uncompressed section alignment to sh_addralign.
      It is not correct. zlib styled section contains an Elfxx_Chdr header,
      so we should either use 4 or 8 values depending on the target
      (Uncompressed section alignment is stored in ch_addralign field of the compression header).
      
      GNU assembler version 2.31.1 also has this issue,
      but in 2.32.51 it was already fixed. This is how it was found
      during debugging of the https://bugs.llvm.org/show_bug.cgi?id=40482
      actually.
      
      Differential revision: https://reviews.llvm.org/D60965
      
      llvm-svn: 358960
      b9ed9cb5
    • Pavel Labath's avatar
      UnwindPlan: pretty-print dwarf expressions · 7a784203
      Pavel Labath authored
      Summary:
      Previously we were printing the dwarf expressions in unwind rules simply
      as "dwarf-expr". This patch uses the existing dwarf-printing
      capabilities in lldb to enhance this dump output, and print the full
      decoded dwarf expression.
      
      Reviewers: jasonmolenda, clayborg
      
      Subscribers: aprantl, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D60949
      
      llvm-svn: 358959
      7a784203
    • David Green's avatar
      [LSR] Limit the recursion for setup cost · 63a2aa71
      David Green authored
      In some circumstances we can end up with setup costs that are very complex to
      compute, even though the scevs are not very complex to create. This can also
      lead to setupcosts that are calculated to be exactly -1, which LSR treats as an
      invalid cost. This patch puts a limit on the recursion depth for setup cost to
      prevent them taking too long.
      
      Thanks to @reames for the report and test case.
      
      Differential Revision: https://reviews.llvm.org/D60944
      
      llvm-svn: 358958
      63a2aa71
    • Pavel Labath's avatar
      yamlify TestMiniDumpUUID binaries · ed4f48d2
      Pavel Labath authored
      Summary:
      Instead of checking in raw minidump binaries, check in their yaml form,
      and call yaml2obj in the test.
      
      Reviewers: clayborg
      
      Subscribers: javed.absar, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D60948
      
      llvm-svn: 358957
      ed4f48d2
    • Adam Balogh's avatar
      [Analyzer] Fix for previous commit · 8f882701
      Adam Balogh authored
      A compilation warning was in my previous commit which broke the buildbot
      because it is using `-Werror` for compilation. This patch fixes this
      issue.
      
      llvm-svn: 358955
      8f882701
    • Fangrui Song's avatar
      [PowerPC] Fix test with -fno-discard-value-names after rC358949 · fb2783f6
      Fangrui Song authored
      For the clang driver, -DLLVM_ENABLE_ASSERTIONS=off builds default to discard value names.
      
      llvm-svn: 358953
      fb2783f6