1. Feb 08, 2019
    • Matt Arsenault's avatar
      GlobalISel: Try to make legalize rules more useful for vectors · 91be65be
      Matt Arsenault authored
      Mostly keep the existing functions on scalars, but add versions which
      also operate based on the vector element size.
      
      llvm-svn: 353430
      91be65be
    • Pavel Labath's avatar
      Fix headers for files added in r353047 · bae220ce
      Pavel Labath authored
      I started working on that patch before the headers were updated. Since
      they were new files, I didn't get any conflicts during rebase.
      
      llvm-svn: 353429
      bae220ce
    • Nirav Dave's avatar
      [DAG] Cleanup of unused node in SimplifySelectCC. · 24e60819
      Nirav Dave authored
      llvm-svn: 353428
      24e60819
    • Sanjay Patel's avatar
      [x86] split more 256/512-bit shuffles in lowering · a5c4a5e9
      Sanjay Patel authored
        
      This is intentionally a small step because it's hard to know exactly 
      where we might introduce a conflicting transform with the code that 
      tries to form wider shuffles. But I think this is safe - if we have 
      a wide shuffle with 2 operands, then we should do better with an 
      extract + narrow shuffle.
      
      Differential Revision: https://reviews.llvm.org/D57867
      
      llvm-svn: 353427
      a5c4a5e9
    • Nirav Dave's avatar
      [DAG] Cleanup unused node on failed SELECT Combine. · 4b12236f
      Nirav Dave authored
      llvm-svn: 353426
      4b12236f
    • Gabor Marton's avatar
      [ASTImporter] Refactor unittests to be able to parameterize them in a more flexible way · 0b57ccb7
      Gabor Marton authored
      Summary:
      Currently `TestImportBase` is derived from `ParameterizedTestsFixture`
      which explicitly states that the gtest parameter can be only an
      `ArgVector`. This is a limitation when we want to create tests which may
      have different parameters.
      E.g. we would like to create tests where we can combine different test
      parameters. So, for example we'd like gtest to be able to provide
      parameters of `<std::tuple<ArgVector, const char *>` instead of a simple
      `ArgVector`.
      
      Reviewers: a_sidorin, shafik, a.sidorin
      
      Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D57322
      
      llvm-svn: 353425
      0b57ccb7
    • Jordan Rupprecht's avatar
      [llvm-ar][libObject] Fix relative paths when nesting thin archives. · bf990ab5
      Jordan Rupprecht authored
      Summary:
      When adding one thin archive to another, we currently chop off the relative path to the flattened members. For instance, when adding `foo/child.a` (which contains `x.txt`) to `parent.a`, when flattening it we should add it as `foo/x.txt` (which exists) instead of `x.txt` (which does not exist).
      
      As a note, this also undoes the `IsNew` parameter of handling relative paths in r288280. The unit test there still passes.
      
      This was reported as part of testing the kernel build with llvm-ar: https://patchwork.kernel.org/patch/10767545/ (see the second point).
      
      Reviewers: mstorsjo, pcc, ruiu, davide, david2050
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57842
      
      llvm-svn: 353424
      bf990ab5
    • Kadir Cetinkaya's avatar
      [clangd] Mention indexing in docs. · b88144e4
      Kadir Cetinkaya authored
      Reviewers: sammccall
      
      Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D57392
      
      llvm-svn: 353423
      b88144e4
    • Kadir Cetinkaya's avatar
      [clangd] Reduce number of threads used by BackgroundIndex to number of physical cores. · ee23633e
      Kadir Cetinkaya authored
      Summary:
      clangd is using as many threads as logical cores for BackgroundIndex
      by default. We observed that it increases latency of foreground tasks.
      
      This patch aims to change that default to number of physical cores to get rid of
      that extra latency.
      
      Reviewers: ilya-biryukov
      
      Reviewed By: ilya-biryukov
      
      Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D57819
      
      llvm-svn: 353422
      ee23633e
    • Haojian Wu's avatar
      [clangd] Fix an assertion failure in Selection. · ddd64a4f
      Haojian Wu authored
      Summary:
      The assertion is triggered when the Decl is null.
      
      Details for the assertion:
      
      F0207 09:55:09.069385   47308 logging.cc:84] assert.h assertion failed at llvm/include/llvm/Support/Casting.h:105 in static bool llvm::isa_impl_cl<clang::TranslationUnitDecl, const clang::      Decl *>::doit(const From *) [To = clang::TranslationUnitDecl, From = const clang::Decl *]: Val && "isa<> used on a null pointer"
       15 *** Check failure stack trace: ***
       19     @     0x55615c1f7e06  __assert_fail
       20     @     0x55615a6297d8  clang::clangd::(anonymous namespace)::SelectionVisitor::TraverseDecl()
       21     @     0x55615a62f48d  clang::RecursiveASTVisitor<>::TraverseTemplateTemplateParmDecl()
       22     @     0x55615a62b264  clang::RecursiveASTVisitor<>::TraverseDecl()
       23     @     0x55615a62979c  clang::clangd::(anonymous namespace)::SelectionVisitor::TraverseDecl()
       24     @     0x55615a63060c  clang::RecursiveASTVisitor<>::TraverseClassTemplatePartialSpecializationDecl()
       25     @     0x55615a62ae45  clang::RecursiveASTVisitor<>::TraverseDecl()
      
      Reviewers: sammccall
      
      Subscribers: javed.absar, kristof.beyls, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D57879
      
      llvm-svn: 353421
      ddd64a4f
  2. Feb 07, 2019
    • Pavel Labath's avatar
      Fix signed/unsigned mismatches in ProcessInfoTest.cpp · a5d19759
      Pavel Labath authored
      llvm-svn: 353420
      a5d19759
    • Pavel Labath's avatar
      Fix incorrect log messages in NativeProcessLinux (pr40588) · 9303afb3
      Pavel Labath authored
      The "signal" argument was removed from the MonitorCallback function, but
      not from the log statements within it. This wasn't noticed because the
      name "signal" suddenly started referring to the libc function with that
      name.
      
      This fixes that.
      
      llvm-svn: 353419
      9303afb3
    • Kostya Kortchinsky's avatar
      [scudo][standalone] Do not error out on spurious C(XX) flags · 7547170c
      Kostya Kortchinsky authored
      Summary:
      The standalone Scudo version is being built with `-Werror` which can be
      tripped by extraneous command line arguments. We have little control over
      those as they can be passed down to us by `CMAKE_C(XX)_FLAGS`, the reported
      scenario involving `-stdlib=libc++` (see https://reviews.llvm.org/D57412#1384504).
      
      To work around this, disable `-Wunused-command-line-argument`.
      
      Reviewers: eugenis, vitalybuka, Eugene.Zelenko
      
      Reviewed By: eugenis
      
      Subscribers: mgorny, delcypher, #sanitizers, llvm-commits
      
      Tags: #llvm, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D57757
      
      llvm-svn: 353418
      7547170c
    • Nirav Dave's avatar
      [X86] Simplify casing. NFC. · 84e5bf0c
      Nirav Dave authored
      llvm-svn: 353417
      84e5bf0c
    • Nirav Dave's avatar
      [DAG] Cleanup unused nodes on failed store-to-load forward combine. · 724b8108
      Nirav Dave authored
      llvm-svn: 353416
      724b8108
    • Fangrui Song's avatar
      [ELF] Format lines inadvertently indented by rCTE353380 · 8ebb854b
      Fangrui Song authored
      llvm-svn: 353415
      8ebb854b
    • Eric Liu's avatar
      [clangd] Use Dex for dynamic index by default. · 4b68d910
      Eric Liu authored
      Summary:
      Memory usage for a sample TU:
        Without Dex: 17.9M
        With    Dex: 24.4M
      
      The memory increase is considerable but seems tolerable.
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D57878
      
      llvm-svn: 353413
      4b68d910
    • Alexandre Ganea's avatar
      [CodeView] Fix cycles in debug info when merging Types with global hashes · 120366ed
      Alexandre Ganea authored
      When type streams with forward references were merged using GHashes, cycles 
      were introduced in the debug info. This was caused by 
      GlobalTypeTableBuilder::insertRecordAs() not inserting the record on the second
      pass, thus yielding an empty ArrayRef at that record slot. Later on, upon PDB 
      emission, TpiStreamBuilder::commit() would skip that empty record, thus 
      offseting all indices that came after in the stream. 
      
      This solution comes in two steps: 
      
      1. Fix the hash calculation, by doing a multiple-step resolution, iff there are
      forward references in the input stream.
      2. Fix merge by resolving with multiple passes, therefore moving records with
      forward references at the end of the stream. 
      
      This patch also adds support for llvm-readoj --codeview-ghash.
      Finally, fix dumpCodeViewMergedTypes() which previously could reference deleted
      memory. 
      
      Fixes PR40221 
      
      Differential Revision: https://reviews.llvm.org/D57790 
      
      llvm-svn: 353412
      120366ed
    • Erich Keane's avatar
      Fix r350643 to limit COFF emission to <= 32 BYTES instead of BITS. · 892e6331
      Erich Keane authored
      The patch in r350643 incorrectly sets the COFF emission based on bits
      instead of bytes. This patch converts the 32 via CharUnits to bits to
      compare the correct values.
      
      Change-Id: Icf38a16470ad5ae3531374969c033557ddb0d323
      llvm-svn: 353411
      892e6331
    • Pavel Labath's avatar
      Breakpad: temporarily XFAIL line-table tests · fe9bb8ff
      Pavel Labath authored
      The tests are failing on windows because the paths in the symbol file
      are parsed using the host path style. I'm working on a patch to have
      SymbolFileBreakpad auto-detect the correct path style (similar to dwarf
      r351328).
      
      I originally wanted to make this a part of the initial line-table patch,
      but then I simply forgot.
      
      llvm-svn: 353410
      fe9bb8ff
    • Fangrui Song's avatar
      Fix misspelled filenames in file headers · e39b5738
      Fangrui Song authored
      llvm-svn: 353408
      e39b5738
    • Dmitry Vyukov's avatar
      tsan: add more benchmarks · bdfba860
      Dmitry Vyukov authored
      func_entry_exit.cc is for __tsan_func_entry/exit (spends ~75% there),
      we don't yet have any.
      mop.cc is for memory access functions, as compared to mini_bench_local/shared.cc
      this benchmark passes through deduplication logic (ContainsSameAccess).
      
      llvm-svn: 353407
      bdfba860
    • Pavel Labath's avatar
      use_lldb_suite.py: Fix potential infinite loop · 67f6d842
      Pavel Labath authored
      The loop searching for use_lldb_suite_root had a bug where if the marker
      file happened to be missing, it would enter an infinite loop. While this
      shouldn't happen in normal circumstances, it can happen accidentally,
      and debugging it is not very pleasant.
      
      The loop had an exit condition, but it was incorrent (os.path.dirname
      returning None). This will never happen as dirname will just return the
      same folder over and over again once it reaches the root folder. This
      fixes the exit condition to account for that.
      
      llvm-svn: 353406
      67f6d842
    • Pavel Labath's avatar
      Fix some warnings introduced in r353324 (ReproducerInstrumentation patch) · 76016ba1
      Pavel Labath authored
      GetIndexForObjectImpl generated a bunch of "conversion casts away
      constness warnings". Change the function to use "const void *" (and
      static_cast, while I'm at it), to avoid this.
      
      Driver.cpp: unused variable "replay" (this was actually caused by a
      subsequent partial revert of this patch). I just finish the revert by
      removing the variable completely.
      
      llvm-svn: 353405
      76016ba1
    • Pavel Labath's avatar
      SymbolFileBreakpad: Add line table support · 3f35ab8b
      Pavel Labath authored
      Summary:
      This patch teaches SymbolFileBreakpad to parse the line information in
      breakpad files and present it to lldb.
      
      The trickiest question here was what kind of "compile units" to present
      to lldb, as there really isn't enough information in breakpad files to
      correctly reconstruct those.
      
      A couple of options were considered
      - have the entire file be one compile unit
      - have one compile unit for each FILE record
      - have one compile unit for each FUNC record
      
      The main drawback of the first approach is that all of the files would
      be considered "headers" by lldb, and so they wouldn't be searched if
      target.inline-breakpoint-strategy=never. The single compile unit would
      also be huge, and there isn't a good way to name it.
      
      The second approach will create mostly correct compile units for cpp
      files, but it will still be wrong for headers. However, the biggest
      drawback here seemed to be the fact that this can cause a compile unit
      to change mid-function (for example when a function from another file is
      inlined or another file is #included into a function). While I don't
      know of any specific thing that would break in this case, it does sound
      like a thing that we should avoid.
      
      In the end, we chose the third option, as it didn't seem to have any
      major disadvantages, though it was not ideal either. One disadvantage
      here is that this generates a large number of compile units, and there
      is still a question on how to name it. We chose to simply name it after
      the first line record in that function. This should be correct 99.99% of
      the time, though it can produce somewhat strange results if the very
      first line record comes from an #included file.
      
      Reviewers: clayborg, zturner, lemo, markmentovai
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D56595
      
      llvm-svn: 353404
      3f35ab8b
    • Sam Parker's avatar
      [LSR] Generate cross iteration indexes · 67756c09
      Sam Parker authored
          
      Modify GenerateConstantOffsetsImpl to create offsets that can be used
      by indexed addressing modes. If formulae can be generated which
      result in the constant offset being the same size as the recurrence,
      we can generate a pre-indexed access. This allows the pointer to be
      updated via the single pre-indexed access so that (hopefully) no
      add/subs are required to update it for the next iteration. For small
      cores, this can significantly improve performance DSP-like loops.
      
      Differential Revision: https://reviews.llvm.org/D55373
      
      llvm-svn: 353403
      67756c09
    • Martin Storsjo's avatar
      [clang-cl] support /Oy- on aarch64 · bb3b372a
      Martin Storsjo authored
      MSVC supports /Oy- on aarch64, so clang-cl should too.
      
      Patch by Nathan Froyd!
      
      Differential Revision: https://reviews.llvm.org/D57838
      
      llvm-svn: 353402
      bb3b372a
    • Dmitry Vyukov's avatar
      tsan: Optimize performance of Thread sanitizer memory access functions · fddaf1f3
      Dmitry Vyukov authored
      - Manually unwind code in MemoryAccessImpl1() because clang do not optimize it
      - Check for .rodata section only in read operations
      - Place LIKELY/UNLIKELY on fast paths
      
      This speeds up synthetic memory access benchmarks by 10-20%.
      
      [dvyukov: fixed up consts in check_analyze.sh]
      
      Author: yuri (Yuri Per)
      Reviewed in: https://reviews.llvm.org/D57882
      Context: https://reviews.llvm.org/D54889
      
      llvm-svn: 353401
      fddaf1f3
    • Hans Wennborg's avatar
      docs: add missingkeyfunction to doctree, fix title · ccebc7e3
      Hans Wennborg authored
      llvm-svn: 353399
      ccebc7e3
    • Hans Wennborg's avatar
      Typo: s/follwing/following · 9ff983c5
      Hans Wennborg authored
      llvm-svn: 353393
      9ff983c5
    • Diana Picus's avatar
      [ARM GlobalISel] Support G_ICMP for Thumb2 · 75a04e2a
      Diana Picus authored
      Mark as legal and use the t2* equivalents of the arm mode instructions,
      e.g. t2CMPrr instead of plain CMPrr.
      
      llvm-svn: 353392
      75a04e2a
    • Dmitry Vyukov's avatar
      sanitizers: Introduce ThreadType enum · baf2f35e
      Dmitry Vyukov authored
      Replace bool workerthread flag with ThreadType enum.
      This change is preparation for fiber support.
      
      [dvyukov: fixed build of sanitizer_thread_registry_test.cc]
      
      Author: yuri (Yuri Per)
      Reviewed in: https://reviews.llvm.org/D57839
      Context: https://reviews.llvm.org/D54889
      
      llvm-svn: 353390
      baf2f35e
    • Jonas Toth's avatar
      [clang-tidy] Fixed a std::bind() transformation · a822b115
      Jonas Toth authored
      There was an extra semicolon that was somehow working in some contexts.
      
      Patch by oleg.smolsky.
      
      llvm-svn: 353389
      a822b115
    • David Green's avatar
      [ARM] Reformat isRedundantFlagInstr for D57833. NFC · 7e6da816
      David Green authored
      llvm-svn: 353386
      7e6da816
    • Dmitry Vyukov's avatar
      tsan: Implement pthread_exit() interceptor for Thread sanitizer · 17132b62
      Dmitry Vyukov authored
      This change is preparation for fiber support.
      
      Author: yuri (Yuri Per)
      Reviewed in: https://reviews.llvm.org/D57876
      Context: https://reviews.llvm.org/D54889
      
      llvm-svn: 353385
      17132b62
    • Jiong Wang's avatar
      [BPF] add code-gen support for JMP32 instructions · 66b18e57
      Jiong Wang authored
      
      
      JMP32 instructions has been added to eBPF ISA. They are 32-bit variants of
      existing BPF conditional jump instructions, but the comparison happens on
      low 32-bit sub-register only, therefore some unnecessary extensions could
      be saved.
      
      JMP32 instructions will only be available for -mcpu=v3. Host probe hook has
      been updated accordingly.
      
      JMP32 instructions will only be enabled in code-gen when -mattr=+alu32
      enabled, meaning compiling the program using sub-register mode.
      
      For JMP32 encoding, it is a new instruction class, and is using the
      reserved eBPF class number 0x6.
      
      This patch has been tested by compiling and running kernel bpf selftests
      with JMP32 enabled.
      
      Acked-by: default avatarYonghong Song <yhs@fb.com>
      Signed-off-by: default avatarJiong Wang <jiong.wang@netronome.com>
      llvm-svn: 353384
      66b18e57
    • Tim Northover's avatar
      AArch64: implement copy for paired GPR registers. · 638110a2
      Tim Northover authored
      When doing 128-bit atomics using CASP we might need to copy a GPRPair to a
      different register, but that was unimplemented up to now.
      
      llvm-svn: 353383
      638110a2
    • Alexander Kornienko's avatar
      68d56523
    • Raphael Isemann's avatar
      Fix documentation formatting for ShellExpandArguments · 5911a109
      Raphael Isemann authored
      llvm-svn: 353381
      5911a109
    • Eric Liu's avatar
      [clangd] Suggest adding missing includes for typos (like include-fixer). · a9e9c506
      Eric Liu authored
      Summary:
      This adds include-fixer feature into clangd based on D56903. Clangd now captures
      diagnostics caused by typos and attach include insertion fixes to potentially
      fix the typo.
      
      Reviewers: sammccall
      
      Reviewed By: sammccall
      
      Subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous, MaskRay, javed.absar, ilya-biryukov, mgorny
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D57021
      
      llvm-svn: 353380
      a9e9c506