1. Mar 19, 2019
  2. Mar 18, 2019
    • Pavel Labath's avatar
      Fix libstdc++ data formatters for python3 · 22457e66
      Pavel Labath authored
      Use floor-division for consistentcy across python versions. This fixes a
      couple of libstdc++ data formatter tests.
      
      llvm-svn: 356377
      22457e66
    • Louis Dionne's avatar
      [libc++] Add a test for PR40977 · 2bde5303
      Louis Dionne authored
      Even though the header makes the exact same check since https://llvm.org/D59063,
      the headers could conceivably change in the future and introduce a bug.
      
      llvm-svn: 356376
      2bde5303
    • Siva Chandra's avatar
      [ELF] Emit weak-undef symbols in .dynsym of a PIE binary only if linked against shared libs. · 1915e2be
      Siva Chandra authored
      Reviewers: espindola
      
      Subscribers: emaste, arichardson, MaskRay, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D59275
      
      llvm-svn: 356374
      1915e2be
    • Neil Henning's avatar
      [AMDGPU] Add an experimental buffer fat pointer address space. · 523dab07
      Neil Henning authored
      Add an experimental buffer fat pointer address space that is currently
      unhandled in the backend. This commit reserves address space 7 as a
      non-integral pointer repsenting the 160-bit fat pointer (128-bit buffer
      descriptor + 32-bit offset) that is heavily used in graphics workloads
      using the AMDGPU backend.
      
      Differential Revision: https://reviews.llvm.org/D58957
      
      llvm-svn: 356373
      523dab07
    • Sanjay Patel's avatar
      [InstCombine] allow general vector constants for funnel shift to shift transforms · 60633935
      Sanjay Patel authored
      Follow-up to:
      rL356338
      rL356369
      
      We can calculate an arbitrary vector constant minus the bitwidth, so there's
      no need to limit this transform to scalars and splats.
      
      llvm-svn: 356372
      60633935
    • George Rimar's avatar
      [llvm-objcopy] - Calculate the string table section sizes correctly. · faf308b1
      George Rimar authored
      This fixes the https://bugs.llvm.org/show_bug.cgi?id=40980.
      
      Previously if string optimization occurred as a result of
      StringTableBuilder's finalize() method, the size wasn't updated.
      
      This hopefully also makes the interaction between sections during finalization
      processes a bit more clear.
      
      Differential revision: https://reviews.llvm.org/D59488
      
      llvm-svn: 356371
      faf308b1
    • Pavel Labath's avatar
      Fix TestCommandScriptImmediateOutput for python3 · 58e9ef13
      Pavel Labath authored
      s/iteritems/items
      
      llvm-svn: 356370
      58e9ef13
    • Sanjay Patel's avatar
      [InstCombine] extend rotate-left-by-constant canonicalization to funnel shift · 84de8a30
      Sanjay Patel authored
      Follow-up to:
      rL356338
      
      Rotates are a special case of funnel shift where the 2 input operands
      are the same value, but that does not need to be a restriction for the
      canonicalization when the shift amount is a constant.
      
      llvm-svn: 356369
      84de8a30
    • Simon Pilgrim's avatar
      [SystemZ] Remove icmp undef from reduced tests · f9ab4f5f
      Simon Pilgrim authored
      Pre-commit for D59363 (Add icmp UNDEF handling to SelectionDAG::FoldSetCC)
      
      Approved by @uweigand (Ulrich Weigand)
      
      llvm-svn: 356368
      f9ab4f5f
    • Sanjay Patel's avatar
      [InstCombine] add funnel shift tests with arbitrary constants; NFC · d7f15393
      Sanjay Patel authored
      llvm-svn: 356367
      d7f15393
    • Fangrui Song's avatar
      [pp-trace] Delete -ignore and add a new option -callbacks · 560a45a3
      Fangrui Song authored
      Summary:
      -ignore specifies a list of PP callbacks to ignore. It cannot express a
      whitelist, which may be more useful than a blacklist.
      Add a new option -callbacks to replace it.
      
      -ignore= (default) => -callbacks='*' (default)
      -ignore=FileChanged,FileSkipped => -callbacks='*,-FileChanged,-FileSkipped'
      
      -callbacks='Macro*' : print only MacroDefined,MacroExpands,MacroUndefined,...
      
      Reviewers: juliehockett, aaron.ballman, alexfh, ioeric
      
      Reviewed By: aaron.ballman
      
      Subscribers: nemanjai, kbarton, jsji, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D59296
      
      llvm-svn: 356366
      560a45a3
    • Roman Lebedev's avatar
      [llvm-exegesis] Separate tool options into three categories. · 23629385
      Roman Lebedev authored
      Results in much nicer -help output:
      ```
      $ ./bin/llvm-exegesis -help
      USAGE: llvm-exegesis [options]
      
      OPTIONS:
      
      Color Options:
      
        -color                                         - Use colors in output (default=autodetect)
      
      General options:
      
        -enable-cse-in-irtranslator                    - Should enable CSE in irtranslator
        -enable-cse-in-legalizer                       - Should enable CSE in Legalizer
      
      Generic Options:
      
        -help                                          - Display available options (-help-hidden for more)
        -help-list                                     - Display list of available options (-help-list-hidden for more)
        -version                                       - Display the version of this program
      
      llvm-exegesis analysis options:
      
        -analysis-clustering-epsilon=<number>          - dbscan epsilon for benchmark point clustering
        -analysis-clusters-output-file=<string>        -
        -analysis-display-unstable-clusters            - if there is more than one benchmark for an opcode, said benchmarks may end up not being clustered into the same cluster if the measured performance characteristics are different. by default all such opcodes are filtered out. this flag will instead show only such unstable opcodes
        -analysis-inconsistencies-output-file=<string> -
        -analysis-inconsistency-epsilon=<number>       - epsilon for detection of when the cluster is different from the LLVM schedule profile values
        -analysis-numpoints=<uint>                     - minimum number of points in an analysis cluster
      
      llvm-exegesis benchmark options:
      
        -ignore-invalid-sched-class                    - ignore instructions that do not define a sched class
        -mode=<value>                                  - the mode to run
          =latency                                     -   Instruction Latency
          =inverse_throughput                          -   Instruction Inverse Throughput
          =uops                                        -   Uop Decomposition
          =analysis                                    -   Analysis
        -num-repetitions=<uint>                        - number of time to repeat the asm snippet
        -opcode-index=<int>                            - opcode to measure, by index
        -opcode-name=<string>                          - comma-separated list of opcodes to measure, by name
        -snippets-file=<string>                        - code snippets to measure
      
      llvm-exegesis options:
      
        -benchmarks-file=<string>                      - File to read (analysis mode) or write (latency/uops/inverse_throughput modes) benchmark results. “-” uses stdin/stdout.
        -mcpu=<string>                                 - cpu name to use for pfm counters, leave empty to autodetect
      ```
      
      llvm-svn: 356364
      23629385
    • David Stenberg's avatar
      [DebugInfo] Ignore bitcasts when lowering stack arg dbg.values · 8a2e4af7
      David Stenberg authored
      Summary:
      Look past bitcasts when looking for parameter debug values that are
      described by frame-index loads in `EmitFuncArgumentDbgValue()`.
      
      In the attached test case we would be left with an undef `DBG_VALUE`
      for the parameter without this patch.
      
      A similar fix was done for parameters passed in registers in D13005.
      
      This fixes PR40777.
      
      Reviewers: aprantl, vsk, jmorse
      
      Reviewed By: aprantl
      
      Subscribers: bjope, javed.absar, jdoerfert, llvm-commits
      
      Tags: #debug-info, #llvm
      
      Differential Revision: https://reviews.llvm.org/D58831
      
      llvm-svn: 356363
      8a2e4af7
    • Pavel Labath's avatar
      Fix "type qualifiers ignored on cast result type" warnings · f92ddfed
      Pavel Labath authored
      These warnings start to get emitted with gcc-8.
      
      llvm-svn: 356362
      f92ddfed
    • Pavel Labath's avatar
      Reinitialize UnwindTable when the SymbolFile changes · dec96392
      Pavel Labath authored
      Summary:
      This is a preparatory step to enable adding of unwind plans by symbol
      file plugins.
      
      Although at the surface it seems that currently symbol files have
      nothing to do with unwinding, this isn't entirely correct even now. The
      mere act of adding a symbol file can have the effect of making more
      sections (typically .debug_frame) available to the unwinding machinery,
      so that it can have more unwind strategies to choose from.
      
      Up until now, we've had a bug, which went largely unnoticed, where
      unwind info in the manually added symbols files (target symbols add) was
      being ignored during unwinding. Reinitializing the UnwindTable fixes
      that bug too.
      
      Reviewers: clayborg, jasonmolenda, alexshap
      
      Subscribers: jdoerfert, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D58347
      
      llvm-svn: 356361
      dec96392
    • Christof Douma's avatar
      [AArch64] Fix bug 35094 atomicrmw on Armv8.1-A+lse · 8cfd91dc
      Christof Douma authored
      Fixes https://bugs.llvm.org/show_bug.cgi?id=35094
      
      The Dead register definition pass should leave alone the atomicrmw
      instructions on AArch64 (LTE extension). The reason is the following
      statement in the Arm ARM:
      
      "The ST<OP> instructions, and LD<OP> instructions where the destination
      register is WZR or XZR, are not regarded as doing a read for the purpose
      of a DMB LD barrier."
      
      A good example was given in the gcc thread by Will Deacon (linked in the
      bugzilla ticket 35094):
      
          P0 (atomic_int* y,atomic_int* x) {
            atomic_store_explicit(x,1,memory_order_relaxed);
            atomic_thread_fence(memory_order_release);
            atomic_store_explicit(y,1,memory_order_relaxed);
          }
      
          P1 (atomic_int* y,atomic_int* x) {
            atomic_fetch_add_explicit(y,1,memory_order_relaxed);  // STADD
            atomic_thread_fence(memory_order_acquire);
            int r0 = atomic_load_explicit(x,memory_order_relaxed);
          }
      
          P2 (atomic_int* y) {
            int r1 = atomic_load_explicit(y,memory_order_relaxed);
          }
      
          My understanding is that it is forbidden for r0 == 0 and r1 == 2 after
          this test has executed. However, if the relaxed add in P1 compiles to
          STADD and the subsequent acquire fence is compiled as DMB LD, then we
          don't have any ordering guarantees in P1 and the forbidden result could
          be observed.
      
      Change-Id: I419f9f9df947716932038e1100c18d10a96408d0
      llvm-svn: 356360
      8cfd91dc
    • Craig Topper's avatar
      ba898da1
    • Alex Bradbury's avatar
      [RISCV] Add ImmArg to intrinsics · 60444ad1
      Alex Bradbury authored
      llvm-svn: 356358
      60444ad1
    • Craig Topper's avatar
      [X86] Add ADD8ri_DB and ADD8rr_DB to the autogenerated load folding table. · d94db936
      Craig Topper authored
      These were added in r355423.
      
      We only use the autogenerated table to assist with the maintenance of the
      manual table. These entries are alreayd in the manual table.
      
      llvm-svn: 356357
      d94db936
    • Craig Topper's avatar
      [X86] Make ADD*_DB post-RA pseudos and expand them in expandPostRAPseudo. · b4c49255
      Craig Topper authored
      These are used to help convert OR->LEA when needed to avoid avoid a copy. They
      aren't need after register allocation.
      
      Happens to remove an ugly goto from X86MCCodeEmitter.cpp
      
      llvm-svn: 356356
      b4c49255
    • Craig Topper's avatar
      [X86] Add tab character to the custom printing of VPCMP and VPCOM instructions. · 860a2720
      Craig Topper authored
      All the other instructions are printed with a preceeding tab.
      
      llvm-svn: 356355
      860a2720
    • Matt Arsenault's avatar
      Add testcase from bug 41079 · 541bccf4
      Matt Arsenault authored
      llvm-svn: 356354
      541bccf4
    • Matt Arsenault's avatar
      Remove immarg from llvm.expect · 4873056c
      Matt Arsenault authored
      The LangRef claimed this was required to be a constant, but this
      appears to be wrong.
      
      Fixes bug 41079.
      
      llvm-svn: 356353
      4873056c
    • Craig Topper's avatar
      [X86] Merge printf32mem/printi32mem into a single printdwordmem. Do the same... · 04cc28fe
      Craig Topper authored
      [X86] Merge printf32mem/printi32mem into a single printdwordmem. Do the same for all other printing functions.
      
      The only thing the print methods currently need to know is the string to print for the memory size in intel syntax.
      
      This patch merges the functions based on this string. If we ever need something else in the future, its easy to split them back out.
      
      This reduces the number of cases in the assembly printers. It shrinks the intel printer to only use 7 bytes per instruction instead of 8.
      
      llvm-svn: 356352
      04cc28fe
    • Tim Renouf's avatar
      [CodeGen] Defined MVTs v3i32, v3f32, v5i32, v5f32 · c4e128e2
      Tim Renouf authored
      AMDGPU would like to use these MVTs.
      
      Differential Revision: https://reviews.llvm.org/D58901
      
      Change-Id: I6125fea810d7cc62a4b4de3d9904255a1233ae4e
      llvm-svn: 356351
      c4e128e2
    • Tim Renouf's avatar
      [CodeGen] Prepare for introduction of v3 and v5 MVTs · c302b9b5
      Tim Renouf authored
      AMDGPU would like to have MVTs for v3i32, v3f32, v5i32, v5f32. This
      commit does not add them, but makes preparatory changes:
      
      * Exclude non-legal non-power-of-2 vector types from ComputeRegisterProp
        mechanism in TargetLoweringBase::getTypeConversion.
      
      * Cope with SETCC and VSELECT for odd-width i1 vector when the other
        vectors are legal type.
      
      Some of this patch is from Matt Arsenault, also of AMD.
      
      Differential Revision: https://reviews.llvm.org/D58899
      
      Change-Id: Ib5f23377dbef511be3a936211a0b9f94e46331f8
      llvm-svn: 356350
      c302b9b5
    • David Green's avatar
      [ARM] Check that CPSR does not have other uses · baa94ef0
      David Green authored
      Fix up rL356335 by checking that CPSR is not read between
      the compare and the branch.
      
      llvm-svn: 356349
      baa94ef0