1. Feb 22, 2021
    • 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
  3. Feb 20, 2021
    • Fraser Cormack's avatar
      [RISCV] Support extraction of misaligned subvectors · 3e1317fd
      Fraser Cormack authored
      This patch extends the support for RVV EXTRACT_SUBVECTOR to cover those
      which don't align to a vector register boundary. It accomplishes this by
      extracting the nearest register-sized subvector (a subregister
      operation), then sliding the vector down with VSLIDEDOWN and extracting
      the subvector from the first position (a COPY operation).
      
      Since this procedure involves the use of VSCALE and multiplication, the
      handling of such operations is done during lowering to simplify the
      implementation and make use of DAG combining. This necessitated moving
      some helper functions from RISCVISelDAGToDAG to RISCVTargetLowering.
      
      Reviewed By: craig.topper
      
      Differential Revision: https://reviews.llvm.org/D96959
      3e1317fd
    • Fraser Cormack's avatar
      [RISCV] Improve register allocation around vector masks · 9aa20cae
      Fraser Cormack authored
      With vector mask registers only allocatable to V0 (VMV0Regs) it is
      relatively simple to generate code which uses multiple masks and naively
      requires spilling.
      
      This patch aims to improve codegen in such cases by telling LLVM it can
      use VRRegs to hold masks. This will prevent spilling in many cases by
      having LLVM copy to an available VR register.
      
      Reviewed By: craig.topper
      
      Differential Revision: https://reviews.llvm.org/D97055
      9aa20cae
    • David Zarzycki's avatar
      [lit testing] "END." not "END:" · 4550fdff
      David Zarzycki authored
      4550fdff