1. Sep 10, 2019
    • Haojian Wu's avatar
      [clangd] some tweaks on the vscode readme, NFC · 2fa2d459
      Haojian Wu authored
      llvm-svn: 371495
      2fa2d459
    • Roger Ferrer Ibanez's avatar
      [RISCV] Default to ilp32d/lp64d in RISC-V Linux · 8e873963
      Roger Ferrer Ibanez authored
      When running clang as a native compiler in RISC-V Linux the flag
      -mabi=ilp32d / -mabi=lp64d is always mandatory. This change makes it the
      default there.
      
      Differential Revision: https://reviews.llvm.org/D65634
      
      llvm-svn: 371494
      8e873963
    • Craig Topper's avatar
      [LegalizeTypes] Teach SoftenFloatOp_SELECT_CC to handle operand 2 or 3 being softened. · e8b432fa
      Craig Topper authored
      This can only happen on X86 when fp128 is a legal type, but we
      go through softening to generate libcalls. This causes fp128 to
      be softened to fp128 instead of an integer type. This can be
      removed if D67128 lands.
      
      llvm-svn: 371493
      e8b432fa
    • Roger Ferrer Ibanez's avatar
      [RISCV] Move architecture parsing code into its own function · 60f0a6f6
      Roger Ferrer Ibanez authored
      I plan to reuse it in a later patch.
      
      This is almost NFC except a small change in control flow when diagnosing
      +d without +f.
      
      Differential Revision: https://reviews.llvm.org/D66002
      
      llvm-svn: 371492
      60f0a6f6
    • David Carlier's avatar
      [LLDB] FreeBSD fix new SetFile call. · c190890c
      David Carlier authored
      llvm-svn: 371491
      c190890c
    • Nico Weber's avatar
      gn build: Merge r371488 · 88d6783f
      Nico Weber authored
      llvm-svn: 371489
      88d6783f
    • Petr Hosek's avatar
      Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" · 7d1757ab
      Petr Hosek authored
      This reverts commit r371484: this broke sanitizer-x86_64-linux-fast bot.
      
      llvm-svn: 371488
      7d1757ab
    • Craig Topper's avatar
      [X86] Add broadcast load unfolding support for VCMPPS/PD. · 0e533ca4
      Craig Topper authored
      llvm-svn: 371487
      0e533ca4
    • Craig Topper's avatar
      [X86] Add broadcast load unfold tests for VCMPPS/PD. · 7c2fdf27
      Craig Topper authored
      llvm-svn: 371486
      7c2fdf27
    • Nico Weber's avatar
      gn build: Merge r371484 · a6e5a7b6
      Nico Weber authored
      llvm-svn: 371485
      a6e5a7b6
    • Petr Hosek's avatar
      clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM · a10802fd
      Petr Hosek authored
      This patch contains the basic functionality for reporting potentially
      incorrect usage of __builtin_expect() by comparing the developer's
      annotation against a collected PGO profile. A more detailed proposal and
      discussion appears on the CFE-dev mailing list
      (http://lists.llvm.org/pipermail/cfe-dev/2019-July/062971.html) and a
      prototype of the initial frontend changes appear here in D65300
      
      We revised the work in D65300 by moving the misexpect check into the
      LLVM backend, and adding support for IR and sampling based profiles, in
      addition to frontend instrumentation.
      
      We add new misexpect metadata tags to those instructions directly
      influenced by the llvm.expect intrinsic (branch, switch, and select)
      when lowering the intrinsics. The misexpect metadata contains
      information about the expected target of the intrinsic so that we can
      check against the correct PGO counter when emitting diagnostics, and the
      compiler's values for the LikelyBranchWeight and UnlikelyBranchWeight.
      We use these branch weight values to determine when to emit the
      diagnostic to the user.
      
      A future patch should address the comment at the top of
      LowerExpectIntrisic.cpp to hoist the LikelyBranchWeight and
      UnlikelyBranchWeight values into a shared space that can be accessed
      outside of the LowerExpectIntrinsic pass. Once that is done, the
      misexpect metadata can be updated to be smaller.
      
      In the long term, it is possible to reconstruct portions of the
      misexpect metadata from the existing profile data. However, we have
      avoided this to keep the code simple, and because some kind of metadata
      tag will be required to identify which branch/switch/select instructions
      are influenced by the use of llvm.expect
      
      Patch By: paulkirth
      Differential Revision: https://reviews.llvm.org/D66324
      
      llvm-svn: 371484
      a10802fd
    • Kai Luo's avatar
      [PowerPC][NFC] Update test assertions using update_llc_test_checks.py · 73da43ae
      Kai Luo authored
      Summary:
      This patch is made due to https://reviews.llvm.org/rL371289 where typo
      fixes failed.
      
      Differential Revision: https://reviews.llvm.org/D67317
      
      llvm-svn: 371483
      73da43ae
    • Mehdi Amini's avatar
      Revert [git-llvm] Do not reinvent `@{upstream}` · daa79c53
      Mehdi Amini authored
      This reverts r371290 (git commit 7faffd54)
      
      The change wasnt NFC and broke some users' workflow. Reverting while figuring
      out the best alternative to move forward.
      
      llvm-svn: 371480
      daa79c53
    • Nico Weber's avatar
      gn build: Merge r371466 · 93961434
      Nico Weber authored
      llvm-svn: 371479
      93961434
    • Reid Kleckner's avatar
      Remove REQUIRES:shell from tests that pass for me on Windows · a9980f60
      Reid Kleckner authored
      I see in the history for some of these tests REQUIRES:shell was used as
      a way to disable tests on Windows because they are flaky there. I tried
      not to re-enable such tests, but it's possible that I missed some and
      this will re-enable flaky tests on Windows. If so, we should disable
      them with UNSUPPORTED:system-windows and add a comment that they are
      flaky there. So far as I can tell, the lit internal shell is capable of
      running all of these tests, and we shouldn't use REQUIRES:shell as a
      proxy for Windows.
      
      llvm-svn: 371478
      a9980f60
    • Nico Weber's avatar
      gn build: (manually) merge r371429 · fcbc512f
      Nico Weber authored
      llvm-svn: 371477
      fcbc512f
    • Richard Smith's avatar
      Fix crash mangling an explicit lambda non-type template parameter pack · ae6f7bcb
      Richard Smith authored
      that is not a pack expansion.
      
      llvm-svn: 371476
      ae6f7bcb
    • Jan Korous's avatar
      [llvm][ADT][NFC] Add test for makeArrayRef(std::array) · 79707ecd
      Jan Korous authored
      llvm-svn: 371475
      79707ecd
    • Jonas Devlieghere's avatar
      [Utility] Replace `lldb_private::CleanUp` by `llvm::scope_exit` · e0ea8d87
      Jonas Devlieghere authored
      This removes the CleanUp class and replaces its usages with llvm's
      ScopeExit, which has similar semantics.
      
      Differential revision: https://reviews.llvm.org/D67378
      
      llvm-svn: 371474
      e0ea8d87
    • Reid Kleckner's avatar
      Remove some unnecessary REQUIRES: shell lines · 87d47cb7
      Reid Kleckner authored
      This means these tests will run on Windows. Replace one with
      UNSUPPORTED: system-windows.
      
      llvm-svn: 371473
      87d47cb7
    • Alex Langford's avatar
      [Expression] Remove unused header from LLVMUserExpression · 1dbee8f0
      Alex Langford authored
      llvm-svn: 371472
      1dbee8f0
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Fix insert point when lowering fminnum/fmaxnum · a91f017a
      Matt Arsenault authored
      llvm-svn: 371471
      a91f017a
    • Alex Langford's avatar
      [Symbol] Give ClangASTContext a PersistentExpressionState instead of a ClangPersistentVariables · 9e865618
      Alex Langford authored
      ClangASTContext doesn't use m_persistent_variables in a way specific to
      ClangPersistentVariables. Therefore, it should hold a unique pointer to
      PersistentExpressionState instead of a ClangPersistentVariablesUP.
      This also prevents you from pulling in a plugin header when including
      ClangASTContext.h
      
      Doing this exposed an implicit dependency in ObjCLanguage that was
      corrected by including ClangModulesDeclVendor.h
      
      llvm-svn: 371470
      9e865618
    • Richard Smith's avatar
      Fix incorrect demangling of call operator of lambda with explicit · 865697f9
      Richard Smith authored
      template parameters due to registering template parameters twice.
      
      llvm-svn: 371469
      865697f9
    • Richard Smith's avatar
      PR43242: Fix crash when typo-correcting to an operator() that should not · 245ba2c2
      Richard Smith authored
      have been visible.
      
      llvm-svn: 371468
      245ba2c2
    • Austin Kerbow's avatar
      AMDGPU/GlobalISel: Rename MIRBuilder to B. NFC · 06c8cb03
      Austin Kerbow authored
      Reviewers: arsenm
      
      Reviewed By: arsenm
      
      Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, Petar.Avramovic, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D67374
      
      llvm-svn: 371467
      06c8cb03
    • Reid Kleckner's avatar
      [Windows] Replace TrapUnreachable with an int3 insertion pass · bf02399a
      Reid Kleckner authored
      This is an alternative to D66980, which was reverted. Instead of
      inserting a pseudo instruction that optionally expands to nothing, add a
      pass that inserts int3 when appropriate after basic block layout.
      
      Reviewers: hans
      
      Differential Revision: https://reviews.llvm.org/D67201
      
      llvm-svn: 371466
      bf02399a
    • Aditya Nandakumar's avatar
      [GlobalISel]: Fix a bug where we could dereference None · 5112b711
      Aditya Nandakumar authored
      getConstantVRegVal returns None when dealing with constants > 64 bits.
      Don't assume we always have a value in GISelKnownBits.
      
      llvm-svn: 371465
      5112b711
    • Richard Smith's avatar
      Simplify demangler rule for lambda-expressions to match discussion on · 2ca73701
      Richard Smith authored
      cxx-abi list.
      
      llvm-svn: 371462
      2ca73701
    • Evgeniy Stepanov's avatar
      LangRef: mention MSan's problem with speculative conditional branches. · f0e2755b
      Evgeniy Stepanov authored
      Summary:
      This short blurb aims to disallow optimizations like we had to revert
      (under MSan) in
        https://reviews.llvm.org/D21165
        https://bugs.llvm.org/show_bug.cgi?id=28054
        https://reviews.llvm.org/D67205
      
      Reviewers: vitalybuka, efriedma
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D67244
      
      llvm-svn: 371461
      f0e2755b
    • Jonas Devlieghere's avatar
      Revert "[Reproducer] Add a `cont` to ModuleCXX.test" · e0bce4e1
      Jonas Devlieghere authored
      This should no longer be necessary after r371459.
      
      llvm-svn: 371460
      e0bce4e1
    • Jonas Devlieghere's avatar
      [Reproducer] Disconnect when the replay server is out of packets. · 9b961cc6
      Jonas Devlieghere authored
      This is a fix for the issue described in r371144.
      
      > On more than one occasion I've found this test got stuck during replay
      > while waiting for a packet from debugserver when the debugger was in
      > the process of being destroyed.
      
      When the replay server is out of packets we should just disconnect so
      the debugger doesn't have to do any cleanup that it wouldn't do during
      capture.
      
      llvm-svn: 371459
      9b961cc6
    • Simon Atanasyan's avatar
    • Greg Clayton's avatar
      Fix ELF core file memory reading for PT_LOAD program headers with no p_filesz · 4f68c226
      Greg Clayton authored
      Prior to this fix, ELF files might contain PT_LOAD program headers that had a valid p_vaddr, and a valid file p_offset, but the p_filesz would be zero. For example in llvm-project/lldb/test/testcases/functionalities/postmortem/elf-core/thread_crash/linux-i386.core we see:
      
      Program Headers:
      Index   p_type           p_flags    p_offset           p_vaddr            p_paddr            p_filesz           p_memsz            p_align
      ======= ---------------- ---------- ------------------ ------------------ ------------------ ------------------ ------------------ ------------------
      [    0] PT_NOTE          0x00000000 0x0000000000000474 0x0000000000000000 0x0000000000000000 0x0000000000001940 0x0000000000000000 0x0000000000000000
      [    1] PT_LOAD          0x00000005 0x0000000000002000 0x0000000008048000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000
      [    2] PT_LOAD          0x00000004 0x0000000000002000 0x000000000804b000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [    3] PT_LOAD          0x00000006 0x0000000000002000 0x000000000804c000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [    4] PT_LOAD          0x00000006 0x0000000000002000 0x0000000009036000 0x0000000000000000 0x0000000000000000 0x0000000000025000 0x0000000000001000
      [    5] PT_LOAD          0x00000000 0x0000000000002000 0x00000000f63a1000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [    6] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f63a2000 0x0000000000000000 0x0000000000000000 0x0000000000800000 0x0000000000001000
      [    7] PT_LOAD          0x00000000 0x0000000000002000 0x00000000f6ba2000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [    8] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f6ba3000 0x0000000000000000 0x0000000000000000 0x0000000000804000 0x0000000000001000
      [    9] PT_LOAD          0x00000005 0x0000000000002000 0x00000000f73a7000 0x0000000000000000 0x0000000000000000 0x00000000001b1000 0x0000000000001000
      [   10] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f7558000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000
      [   11] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f755a000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [   12] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f755b000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000
      [   13] PT_LOAD          0x00000005 0x0000000000002000 0x00000000f755e000 0x0000000000000000 0x0000000000000000 0x0000000000019000 0x0000000000001000
      [   14] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f7577000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [   15] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f7578000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [   16] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f7579000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000
      [   17] PT_LOAD          0x00000005 0x0000000000002000 0x00000000f757b000 0x0000000000000000 0x0000000000000000 0x000000000001c000 0x0000000000001000
      [   18] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f7597000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [   19] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f7598000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [   20] PT_LOAD          0x00000005 0x0000000000002000 0x00000000f7599000 0x0000000000000000 0x0000000000000000 0x0000000000053000 0x0000000000001000
      [   21] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f75ec000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [   22] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f75ed000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [   23] PT_LOAD          0x00000005 0x0000000000002000 0x00000000f75ee000 0x0000000000000000 0x0000000000000000 0x0000000000176000 0x0000000000001000
      [   24] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f7764000 0x0000000000000000 0x0000000000000000 0x0000000000006000 0x0000000000001000
      [   25] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f776a000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [   26] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f776b000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000
      [   27] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f778a000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000
      [   28] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f778c000 0x0000000000000000 0x0000000000002000 0x0000000000002000 0x0000000000001000
      [   29] PT_LOAD          0x00000005 0x0000000000004000 0x00000000f778e000 0x0000000000000000 0x0000000000002000 0x0000000000002000 0x0000000000001000
      [   30] PT_LOAD          0x00000005 0x0000000000006000 0x00000000f7790000 0x0000000000000000 0x0000000000000000 0x0000000000022000 0x0000000000001000
      [   31] PT_LOAD          0x00000004 0x0000000000006000 0x00000000f77b3000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [   32] PT_LOAD          0x00000006 0x0000000000006000 0x00000000f77b4000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
      [   33] PT_LOAD          0x00000006 0x0000000000006000 0x00000000ffa25000 0x0000000000000000 0x0000000000000000 0x0000000000022000 0x0000000000001000
      Prior to this fix if users tried to read memory from one of these addresses like 0x8048000, they would end up incorrectly reading from the next memory region that actually had a p_filesz which would be 0x00000000f778c000 in this case. This fix correctly doesn't include program headers with zero p_filesz in the ProcessELFCore::m_core_aranges that is used to read memory. I found two cores files that have this same issue and added tests.
      
      Differential Revision: https://reviews.llvm.org/D67370
      
      llvm-svn: 371457
      4f68c226
    • Philip Reames's avatar
      [Tests] Fix a typo in a test · b8cddb76
      Philip Reames authored
      llvm-svn: 371456
      b8cddb76
    • Philip Reames's avatar
      [Tests] Precommit test case for D67372 · 847fbf70
      Philip Reames authored
      llvm-svn: 371455
      847fbf70
    • Simon Pilgrim's avatar
      Fix MSVC "not all control paths return a value" warning. NFCI. · 7f37d9a7
      Simon Pilgrim authored
      llvm-svn: 371454
      7f37d9a7
    • Max Moroz's avatar
      [UBSan] Follow up fix for r371442. · ac3dce59
      Max Moroz authored
      Reviewers: vitalybuka, hctim, Dor1s
      
      Reviewed By: Dor1s
      
      Subscribers: delcypher, #sanitizers, llvm-commits
      
      Tags: #llvm, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D67371
      
      llvm-svn: 371453
      ac3dce59
    • Philip Reames's avatar
      [LoopVectorize] Leverage speculation safety to avoid masked.loads · 7403569b
      Philip Reames authored
      If we're vectorizing a load in a predicated block, check to see if the load can be speculated rather than predicated.  This allows us to generate a normal vector load instead of a masked.load.
      
      To do so, we must prove that all bytes accessed on any iteration of the original loop are dereferenceable, and that all loads (across all iterations) are properly aligned.  This is equivelent to proving that hoisting the load into the loop header in the original scalar loop is safe.
      
      Note: There are a couple of code motion todos in the code.  My intention is to wait about a day - to be sure this sticks - and then perform the NFC motion without furthe review.
      
      Differential Revision: https://reviews.llvm.org/D66688
      
      llvm-svn: 371452
      7403569b
    • Artem Dergachev's avatar
      [analyzer] NFC: Simplify bug report equivalence classes to not be ilists. · 589273be
      Artem Dergachev authored
      Use a vector of unique pointers instead.
      
      Differential Revision: https://reviews.llvm.org/D67024
      
      llvm-svn: 371451
      589273be