1. Jan 11, 2021
  2. Jan 10, 2021
    • Florian Hahn's avatar
      [STLExtras] Use return type from operator* of the wrapped iter. · c701f85c
      Florian Hahn authored
      Currently make_early_inc_range cannot be used with iterators with
      operator* implementations that do not return a reference.
      
      Most notably in the LLVM codebase, this means the User iterator ranges
      cannot be used with make_early_inc_range, which slightly simplifies
      iterating over ranges while elements are removed.
      
      Instead of directly using BaseT::reference as return type of operator*,
      this patch uses decltype to get the actual return type of the operator*
      implementation in WrappedIteratorT.
      
      This patch also updates a few places to use make use of
      make_early_inc_range.
      
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D93992
      c701f85c
    • Nico Weber's avatar
      47991a15
    • Nicolas Vasilache's avatar
      [mlir] NFC - Drop spurious assertion on symbols during `promoteComposedSymbolsAsDims` · a9224860
      Nicolas Vasilache authored
      This assertion is an old remnant from earlier days when only affine functions existed.
      It is not the place of affine map composition to check whether orthogonal considerations
      on what is allowed to be a symbol under the AffineScope trait.
      a9224860
    • Juneyoung Lee's avatar
      [CodeGen] Update transformations to use poison for shufflevector/insertelem's initial vector elem · 9f2d9364
      Juneyoung Lee authored
      This patch is a part of D93817 and makes transformations in CodeGen use poison for shufflevector/insertelem's initial vector element.
      
      The change in CodeGenPrepare.cpp is fine because the mask of shufflevector should be always zero.
      It doesn't touch the second element (which is poison).
      
      The change in InterleavedAccessPass.cpp is also fine becauses the mask is of the form <a, a+m, a+2m, .., a+km> where a+km is smaller than
      the size of the first vector operand.
      This is guaranteed by the caller of replaceBinOpShuffles, which is lowerInterleavedLoad.
      It calls isDeInterleaveMask and isDeInterleaveMaskOfFactor to check the mask is the desirable form.
      isDeInterleaveMask has the check that a+km is smaller than the vector size.
      To check my understanding, I added an assertion & added a test to show that this optimization doesn't fire in such case.
      
      Reviewed By: spatel
      
      Differential Revision: https://reviews.llvm.org/D94056
      9f2d9364
    • Fangrui Song's avatar
      [test] Improve weakref & weak_import tests · b41b743d
      Fangrui Song authored
      b41b743d
    • Craig Topper's avatar
      [RISCV] Change ConstraintMask in RISCVII enum to be shifted left. NFC · 6fc7a92e
      Craig Topper authored
      This makes the mask align with the position of the bits in TSFlags
      which is a little more logical.
      
      I might be adding more fields to TSFlags and some might be single
      bits where just ANDing with mask to test the bit would make sense.
      
      While there rename TargetFlags in validateInstruction to reflect
      that it's just the constraint bits.
      6fc7a92e
    • Craig Topper's avatar
      [RISCV] Use uint16_t instead of unsigned for opcodes in the RVV pseudo instruction table. · 59908fc0
      Craig Topper authored
      We currently have about 7000 opcodes in the RISCVGenInstrInfo.inc
      enum. We can use uint16_t to store these values. We would need to
      grow by nearly 9x before we run out of space so this should last
      for a little while.
      
      This reduces the llc binary by 32K.
      59908fc0
    • Nico Weber's avatar
      [lld/mac] remove redundant null check · 1198478c
      Nico Weber authored
      This is already checked two lines up. No behavior change.
      1198478c
    • Sriraman Tallam's avatar
      Recommit D91678 after fixing the test breakage. · 9f452fbf
      Sriraman Tallam authored
      This adds a new test checking llvm-symbolizer with an object built with basic block sections.
      
      Build a object with -fbasic-block-sections and reorder the basic blocks to be
      non-contiguous. Then check if llvm-symbolizer correctly reports the symbolized
      addresses. Included the source to build the object with command lines.
      
      Differential Revision: https://reviews.llvm.org/D91678
      9f452fbf
    • Fangrui Song's avatar
      [CodeGenModule] Drop dso_local on function declarations for ELF -fno-pic... · e2e82c99
      Fangrui Song authored
      [CodeGenModule] Drop dso_local on function declarations for ELF -fno-pic -fno-direct-access-external-data
      
      ELF -fno-pic sets dso_local on a function declaration to allow direct accesses
      when taking its address (similar to a data symbol). The emitted code follows the
      traditional GCC/Clang -fno-pic behavior: an absolute relocation is produced.
      
      If the function is not defined in the executable, a canonical PLT entry will be
      needed at link time. This is similar to a copy relocation and is incompatible
      with (-Bsymbolic or --dynamic-list linked shared objects / protected symbols in
      a shared object).
      
      This patch gives -fno-pic code a way to avoid such a canonical PLT entry.
      
      The FIXME was about a generalization for -fpie -mpie-copy-relocations (now -fpie
      -fdirect-access-external-data). While we could set dso_local to avoid GOT when
      taking the address of a function declaration (there is an ignorable difference
      about R_386_PC32 vs R_386_PLT32 on i386), it likely does not provide any benefit
      and can just cause trouble, so we don't make the generalization.
      e2e82c99
    • Fraser Cormack's avatar
      [RISCV] Add scalable vector icmp ISel patterns · b02eab90
      Fraser Cormack authored
      
      
      Original patch by @rogfer01.
      
      The RVV integer comparison instructions are defined in such a way that
      many LLVM operations are defined by using the "opposite" comparison
      instruction and swapping the operands. This is done in this patch in
      most cases, except for the mappings where the immediate range must be
      adjusted to accomodate:
      
          va < i --> vmsle{u}.vi vd, va, i-1, vm
          va >= i --> vmsgt{u}.vi vd, va, i-1, vm
      
      That is left for future optimization; this patch supports all operations
      but in the case of the missing mappings the immediate will be moved to
      a scalar register first.
      
      Since there are so many condition codes and operand cases to check, it
      was decided to reduce the test burden by only testing the "vscale x 8"
      vector types.
      
      Authored-by: default avatarRoger Ferrer Ibanez <rofirrim@gmail.com>
      Co-Authored-by: default avatarFraser Cormack <fraser@codeplay.com>
      
      Reviewed By: craig.topper
      
      Differential Revision: https://reviews.llvm.org/D94168
      b02eab90
    • Fraser Cormack's avatar
      [SelectionDAG] Teach isConstOrConstSplat about ISD::SPLAT_VECTOR · 41d06095
      Fraser Cormack authored
      This improves llvm::isConstOrConstSplat by allowing it to analyze
      ISD::SPLAT_VECTOR nodes, in order to allow more constant-folding of
      operations using scalable vector types.
      
      Reviewed By: craig.topper
      
      Differential Revision: https://reviews.llvm.org/D94168
      41d06095
    • Lewuathe's avatar
      [mlir] Enhance mlir-opt show-dialects test case · 03d24939
      Lewuathe authored
      mlir-opt supports many more test cases. All available dialects supported by latest mlir-opt should be coverted in the test case.
      
      Reviewed By: aartbik, stephenneuendorffer, mehdi_amini
      
      Differential Revision: https://reviews.llvm.org/D93821
      03d24939
    • Shoaib Meenai's avatar
      [clang] Add llvm-strip to test dependencies · 4dbb3f57
      Shoaib Meenai authored
      CodeGen/thinlto_embed_bitcode.ll relies on it.
      4dbb3f57
    • Mircea Trofin's avatar
      [NFC] Disallow unused prefixes in CodeGen/X86 tests. · 75c04327
      Mircea Trofin authored
      Also fixed remaining tests that featured unused prefixes.
      
      Differential Revision: https://reviews.llvm.org/D94330
      75c04327
    • Aart Bik's avatar
      [mlir][vector] modified scatter/gather syntax, pass_thru mandatory · 6728af16
      Aart Bik authored
      This change makes the scatter/gather syntax more consistent with
      the syntax of all the other memory operations in the Vector dialect
      (order of types, use of [] for index, etc.). This will make the MLIR
      code easier to read. In addition, the pass_thru parameter of the
      gather has been made mandatory (there is very little benefit in
      using the implicit "undefined" values).
      
      Reviewed By: nicolasvasilache
      
      Differential Revision: https://reviews.llvm.org/D94352
      6728af16