Skip to content
  1. Feb 21, 2021
    • 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
    • Simon Pilgrim's avatar
      [DAG] Match USUBSAT patterns through zext/trunc · 38ab47c8
      Simon Pilgrim authored
      This patch handles usubsat patterns hidden through zext/trunc and uses the getTruncatedUSUBSAT helper to determine if the USUBSAT can be correctly performed in the truncated form:
      
      zext(x) >= y ? x - trunc(y) : 0 --> usubsat(x,trunc(umin(y,SatLimit)))
      zext(x) >  y ? x - trunc(y) : 0 --> usubsat(x,trunc(umin(y,SatLimit)))
      
      Based on original examples:
      
      void foo(unsigned short *p, int max, int n) {
          int i;
          unsigned m;
          for (i = 0; i < n; i++) {
              m = *--p;
              *p = (unsigned short)(m >= max ? m-max : 0);
          }
      }
      
      Differential Revision: https://reviews.llvm.org/D25987
      38ab47c8
    • Simon Pilgrim's avatar
      [X86][AVX] Fold concat(extract_subvector(v0,c0), extract_subvector(v1,c1)) -> vperm2x128 · a6a258f1
      Simon Pilgrim authored
      Fixes regression exposed by removing bitcasts across logic-ops in D96206.
      
      Differential Revision: https://reviews.llvm.org/D96206
      a6a258f1
    • Simon Pilgrim's avatar
      [X86] Fold bitcast(logic(bitcast(X), Y)) --> logic'(X, bitcast(Y)) for int-int bitcasts · 2885d125
      Simon Pilgrim authored
      Extend the existing combine that handles bitcasting for fp-logic ops to also help remove logic ops across bitcasts to/from the same integer types.
      
      This helps improve AVX512 predicate handling for D/Q logic ops and also allows DAGCombine's scalarizeExtractedBinop to remove some annoying gpr->simd->gpr transfers.
      
      The concat_vectors regression in pr40891.ll will be addressed in a followup commit on this patch.
      
      Differential Revision: https://reviews.llvm.org/D96206
      2885d125
    • Craig Topper's avatar
      [RISCV] Add test cases for add/sub/mul overflow intrinsics. NFC · d9207d3f
      Craig Topper authored
      Largely copied from AArch64/arm64-xaluo.ll
      d9207d3f
    • Petr Hosek's avatar
      [lld][ELF] __start_/__stop_ refs don't retain C-ident named group sections · 1a3f3a3f
      Petr Hosek authored
      The special root semantics for identifier-named sections is meant
      specifically for the metadata sections. In the context of group
      semantics, where group members are always retained or discarded as a
      unit, it's natural not to have this semantics apply to a section in a
      group, otherwise we would never discard the group defeating the purpose
      of using the group in the first place.
      
      This change modifies the GC behavior so that __start_/__stop_ references
      don't retain C identifier named sections in section groups which allows
      for these groups to be collected. This matches the behavior of BFD ld.
      
      The only kind of existing case that might break is interdependent
      metadata sections that are all in a group together, but that group
      doesn't contain any other sections referenced by anything except
      implicit inclusion in a `__start_` and/or `__stop_`-referenced
      identifier-named section, but such cases should be unlikely.
      
      Differential Revision: https://reviews.llvm.org/D96753
      1a3f3a3f
    • Kazu Hirata's avatar
      [CodeGen] Use range-based for loops (NFC) · 0b417ba2
      Kazu Hirata authored
      0b417ba2
    • Kazu Hirata's avatar
      [TableGen] Use ListSeparator (NFC) · 9e4033b0
      Kazu Hirata authored
      9e4033b0
    • Jianzhou Zhao's avatar
    • Brad Smith's avatar
      b42d57a1
    • Dave Lee's avatar
      [lldb] Refine ThreadPlan::ShouldAutoContinue · b0186c25
      Dave Lee authored
      Adjust `ShouldAutoContinue` to be available to any thread plan previous to the plan that
      explains a stop, not limited to the parent to the plan that explains the stop.
      
      Before this change, `Thread::ShouldStop` did the following:
      
      1. find the plan that explains the stop
      2. if it's not a master plan, continue processing previous (aka parent) plans
      3. first, call `ShouldAutoContinue` on the immediate parent of the explaining plan
      4. then loop over previous plans, calling `ShouldStop` and `MischiefManaged`
      
      Of note, the iteration in step 4 does not call `ShouldAutoContinue`, so again only the
      plan just prior to the explaining plan is given the opportunity to override whether to
      continue or stop.
      
      This commit changes the loop call `ShouldAutoContinue`, giving each plan the opportunity
      to override `ShouldStop` of previous plans.
      
      Why? This allows a plan to do the following:
      
      1. mark itself done and be popped off the stack
      2. allow parent plans to finish their work, and to also be popped off the stack
      3. and finally, have the thread continue, not stop
      
      This is useful for stepping into async functions. A plan will would step far enough
      enough to set a breakpoint on the async target, and then use `ShouldAutoContinue` to
      unwind the necessary stepping, and then have the calling thread continue.
      
      Differential Revision: https://reviews.llvm.org/D97076
      b0186c25
    • Jacques Pienaar's avatar
    • Jacques Pienaar's avatar
      [mlir] Register the print-op-graph pass using ODS · 02d7b260
      Jacques Pienaar authored
      Move over to ODS & use pass options.
      02d7b260
    • Nathan James's avatar
      [NFC] Refactor PreferMemberInitializerCheck · 557d2ade
      Nathan James authored
      557d2ade
  2. Feb 20, 2021
Loading