1. Feb 22, 2021
    • Martin Storsjö's avatar
    • Pavel Labath's avatar
      Reapply "[lldb/test] Automatically find debug servers to test" · 3ca7b2d0
      Pavel Labath authored
      This reapplies 7df4eaaa/D96202, which was reverted due to issues on
      windows. These were caused by problems in the computation of the liblldb
      directory, which was fixed by D96779.
      
      The original commit message was:
      Our test configuration logic assumes that the tests can be run either
      with debugserver or with lldb-server. This is not entirely correct,
      since lldb server has two "personalities" (platform server and debug
      server) and debugserver is only a replacement for the latter.
      
      A consequence of this is that it's not possible to test the platform
      behavior of lldb-server on macos, as it is not possible to get a hold of
      the lldb-server binary.
      
      One solution to that would be to duplicate the server configuration
      logic to be able to specify both executables. However, that seems
      excessively redundant.
      
      A well-behaved lldb should be able to find the debug server on its own,
      and testing lldb with a different (lldb-|debug)server does not seem very
      us...
      3ca7b2d0
    • Craig Topper's avatar
      [SelectionDAG][RISCV] Teach ComputeNumSignBits to handle SREM. · 1a6c1ac6
      Craig Topper authored
      This also removes a pattern from RISCV that is no longer needed
      since the sexti32 on the LHS of the srem in the pattern implies
      the result is sign extended so the sign_extend_inreg should be
      removed in DAG combine now.
      
      Reviewed By: luismarques, RKSimon
      
      Differential Revision: https://reviews.llvm.org/D97133
      1a6c1ac6
    • Simon Pilgrim's avatar
      [X86][AVX] canonicalizeLaneShuffleWithRepeatedOps - remove unnecessary BITCASTs. · bae04a3e
      Simon Pilgrim authored
      In conjunction with the 'vperm2x128(bitcast(x),bitcast(y),c) -> bitcast(vperm2x128(x,y,c))' fold in combineTargetShuffle, this should remove any unnecessary bitcasts around vperm2x128 lane shuffles.
      bae04a3e
    • António Afonso's avatar
    • madhur13490's avatar
      [NFC] Remove redundant word in comment · 5fe23de5
      madhur13490 authored
      Differential Revision: https://reviews.llvm.org/D97157
      5fe23de5
    • António Afonso's avatar
      [lldb-vscode] Emit the breakpoint changed event on location resolved · 1f21d488
      António Afonso authored
      VSCode was not being informed whenever a location had been resolved (after being initated as non-resolved), so even though it was actually resolved, the IDE would show a hollow dot (instead of a red dot) because it didn't know about the change.
      
      Differential Revision: https://reviews.llvm.org/D96680
      1f21d488
    • Nikita Popov's avatar
      [Loads] Add optimized FindAvailableLoadedValue() overload (NFCI) · e0615bcd
      Nikita Popov authored
      FindAvailableLoadedValue() accepts an iterator by reference. If no
      available value is found, then the iterator will either be left
      at a clobbering instruction or the beginning of the basic block.
      This allows using FindAvailableLoadedValue() across multiple blocks.
      
      If this functionality is not needed, as is the case in InstCombine,
      then we can use a much more efficient implementation: First try
      to find an available value, and only perform clobber checks if
      we actually found one. As this function only looks at a very small
      number of instructions (6 by default) and usually doesn't find an
      available value, this saves many expensive alias analysis queries.
      e0615bcd
    • Sanjay Patel's avatar
      [IR] restrict vector reduction intrinsic types · 215bb157
      Sanjay Patel authored
      The arguments in all cases should be vectors of exactly one of integer or FP.
      
      All of the tests currently pass the verifier because we check for any vector
      type regardless of the type of reduction.
      This obviously can't work if we mix up integer and FP, and based on current
      LangRef text it was not intended to work for pointers either.
      
      The pointer case from https://llvm.org/PR49215 is what led me here. That
      example was avoided with 5b250a27.
      
      Differential Revision: https://reviews.llvm.org/D96904
      215bb157
    • António Afonso's avatar
      Make sure the interpreter module was loaded before making checks against it · a83a825e
      António Afonso authored
      This issue was introduced in https://reviews.llvm.org/D92187.
      The guard I'm changing were is supposed to act when linux is loading the linker for the second time (due to differences in paths like symlinks).
      This is done by checking `module_sp != m_interpreter_module.lock()` however this will be true when `m_interpreter_module` wasn't initialized, making linux unload the linker module (the most visible result here is that lldb will stop getting notified about new modules loaded by the process, because it can't set the rendezvous breakpoint again after the stepping over it once).
      The `m_interpreter_module` is not getting initialize when it goes through this path: https://github.com/llvm/llvm-project/blob/dbfdb139f75470a9abc78e7c9faf743fdd963c2d/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp#L332, which happens when lldb was able to read the address from the dynamic section of the executable.
      
      What I'm not sure about though, is if when we go through this path if we still load the linker twice on linux. If that's the case then it means we need to somehow set the m_interpreter_module instead of the fix I provide here. I've only tested this on Android.
      
      Differential Revision: https://reviews.llvm.org/D96637
      a83a825e
    • Nikita Popov's avatar
      [Loads] Extract helper frunction for available load/store (NFC) · 7c706aa0
      Nikita Popov authored
      This contains the logic for extracting an available load/store
      from a given instruction, to be reused in a following patch.
      7c706aa0
    • Kristina Bessonova's avatar
      [ThinLTO] Fix import of multiply defined global variables · e97aab8d
      Kristina Bessonova authored
      Currently, if there is a module that contains a strong definition of
      a global variable and a module that has both a weak definition for
      the same global and a reference to it, it may result in an undefined symbol error
      while linking with ThinLTO.
      
      It happens because:
      * the strong definition become internal because it is read-only and can be imported;
      * the weak definition gets replaced by a declaration because it's non-prevailing;
      * the strong definition failed to be imported because the destination module
        already contains another definition of the global yet this def is non-prevailing.
      
      The patch adds a check to computeImportForReferencedGlobals() that allows
      considering a global variable for being imported even if the module contains
      a definition of it in the case this def has an interposable linkage type.
      
      Note that currently the check is based only on the linkage type
      (and this seems to be enough at the moment), but it might be worth to account
      the information whether the def is prevailing or not.
      
      Reviewed By: tejohnson
      
      Differential Revision: https://reviews.llvm.org/D95943
      e97aab8d
  2. Feb 21, 2021