Skip to content
  1. May 08, 2021
  2. May 07, 2021
    • Jessica Paquette's avatar
      [AArch64][GlobalISel] Legalize narrow type G_CTPOPs · 13128520
      Jessica Paquette authored
      Using `clampScalar` here because we ought to mark s128 as custom eventually.
      
      (Right now, it will just fall back.)
      
      With this legalization, we get the same code as SDAG:
      https://godbolt.org/z/TneoPKrKG
      
      Differential Revision: https://reviews.llvm.org/D100908
      13128520
    • Adrian Prantl's avatar
    • Petr Hosek's avatar
      [BareMetal] Ensure that sysroot always comes after library paths · 167906c1
      Petr Hosek authored
      This addresses an issue introduced in D91559. We would invoke the
      compiler with -Lpath/to/lib --sysroot=path/to/sysroot where both
      locations contain libraries with the same name, but we expect linker
      to pick up the library in path/to/lib since that version is more
      specialized. This was the case before D91559 where the sysroot path
      would be ignored, but after that change linker would now pick up the
      library from the sysroot which resulted in unexpected behavior.
      
      The sysroot path should always come after any user provided library
      paths, followed by compiler runtime paths. We want for libraries in user
      provided library paths to always take precedence over sysroot libraries.
      This matches the behavior of other toolchains used with other targets.
      
      Differential Revision: https://reviews.llvm.org/D102049
      167906c1
    • Nico Weber's avatar
      [lld/mac] Write every weak symbol only once in the output · d5a70db1
      Nico Weber authored
      Before this, if an inline function was defined in several input files,
      lld would write each copy of the inline function the output. With this
      patch, it only writes one copy.
      
      Reduces the size of Chromium Framework from 378MB to 345MB (compared
      to 290MB linked with ld64, which also does dead-stripping, which we
      don't do yet), and makes linking it faster:
      
              N           Min           Max        Median           Avg        Stddev
          x  10     3.9957051     4.3496981     4.1411121      4.156837    0.10092097
          +  10      3.908154      4.169318     3.9712729     3.9846753   0.075773012
          Difference at 95.0% confidence
                  -0.172162 +/- 0.083847
                  -4.14165% +/- 2.01709%
                  (Student's t, pooled s = 0.0892373)
      
      Implementation-wise, when merging two weak symbols, this sets a
      "canOmitFromOutput" on the InputSection belonging to the weak symbol not put in
      the symbol table. We then don't write InputSections that have this set, as long
      as they are not referenced from other symbols. (This happens e.g. for object
      files that don't set .subsections_via_symbols or that use .alt_entry.)
      
      Some restrictions:
      - not yet done for bitcode inputs
      - no "comdat" handling (`kindNoneGroupSubordinate*` in ld64) --
        Frame Descriptor Entries (FDEs), Language Specific Data Areas (LSDAs)
        (that is, catch block unwind information) and Personality Routines
        associated with weak functions still not stripped. This is wasteful,
        but harmless.
      - However, this does strip weaks from __unwind_info (which is needed for
        correctness and not just for size)
      - This nopes out on InputSections that are referenced form more than
        one symbol (eg from .alt_entry) for now
      
      Things that work based on symbols Just Work:
      - map files (change in MapFile.cpp is no-op and not needed; I just
        found it a bit more explicit)
      - exports
      
      Things that work with inputSections need to explicitly check if
      an inputSection is written (e.g. unwind info).
      
      This patch is useful in itself, but it's also likely also a useful foundation
      for dead_strip.
      
      I used to have a "canoncialRepresentative" pointer on InputSection instead of
      just the bool, which would be handy for ICF too. But I ended up not needing it
      for this patch, so I removed that again for now.
      
      Differential Revision: https://reviews.llvm.org/D102076
      d5a70db1
    • thomasraoux's avatar
      [mlir] Missed clang-format · b90b66bc
      thomasraoux authored
      b90b66bc
    • thomasraoux's avatar
    • Petr Hosek's avatar
      f97ada27
    • Florian Hahn's avatar
      [LV] Remove reference of PHI from comment, they are not recorded (NFC). · 75b99977
      Florian Hahn authored
      The comment incorrectly states that the PHI is recorded. That's not
      accurate, only the recipe for the incoming value is recorded.
      
      Suggested post-commit for 4ba8720f.
      75b99977
    • Andrea Di Biagio's avatar
      [MCA][RegisterFile] Fix register class check for move elimination (PR50265) · 3822ac90
      Andrea Di Biagio authored
      The register file should always check if the destination register is from a
      register class that allows move elimination.
      
      Before this change, the check on the register class was only performed in a few
      very specific cases. However, it should have always been performed.
      This patch fixes the issue.
      
      Note that none of the upstream scheduling models is currently affected by this
      bug, so there is no test for it. The issue was found by Roman while working on
      the znver3 model. I was able to reproduce the issue locally by tweaking the
      btver2 model. I then verified that this patch fixes the issue.
      3822ac90
    • Olivier Goffart's avatar
      [SEH] Fix regression with SEH in noexpect functions · c4adc49a
      Olivier Goffart authored
      Commit 5baea056 set the CurCodeDecl
      because it was needed to pass the assert in CodeGenFunction::EmitLValueForLambdaField,
      But this was not right to do as CodeGenFunction::FinishFunction passes it to EmitEndEHSpec
      and cause corruption of the EHStack.
      
      Revert the part of the commit that changes the CurCodeDecl, and instead
      adjust the assert to check for a null CurCodeDecl.
      
      Differential Revision: https://reviews.llvm.org/D102027
      c4adc49a
    • Florian Hahn's avatar
      [LV] Assert if trying to sink replicate region into another region (NFC) · 337d7652
      Florian Hahn authored
      Currently sinking a replicate region into another replicate region is
      not supported. Add an assert, to make the problem more obvious, should
      it occur.
      
      Discussed post-commit for ccebf7a1.
      337d7652
    • Florian Hahn's avatar
      [LV] Rename Region to TargetRegion, similar to SinkRegion (NFC). · 01c26d4e
      Florian Hahn authored
      Adjust the name to make it clearer this is the region containing the
      target recipe, similar to SinkRegion below.
      
      Suggested post-commit for ccebf7a1.
      01c26d4e
    • peter klausler's avatar
      [flang] Implement NORM2 in the runtime · 01c78a0b
      peter klausler authored
      Implement the reduction transformational intrinsic function NORM2 in
      the runtime, using infrastructure already in place for MAXVAL & al.
      
      Differential Revision: https://reviews.llvm.org/D102024
      01c78a0b
    • Petr Hosek's avatar
      [BareMetal] Ensure that sysroot always comes after library paths · 6b00b34b
      Petr Hosek authored
      This addresses an issue introduced in D91559. We would invoke the
      compiler with -Lpath/to/lib --sysroot=path/to/sysroot where both
      locations contain libraries with the same name, but we expect linker
      to pick up the library in path/to/lib since that version is more
      specialized. This was the case before D91559 where the sysroot path
      would be ignored, but after that change linker would now pick up the
      library from the sysroot which resulted in unexpected behavior.
      
      The sysroot path should always come after any user provided library
      paths, followed by compiler runtime paths. We want for libraries in user
      provided library paths to always take precedence over sysroot libraries.
      This matches the behavior of other toolchains used with other targets.
      
      Differential Revision: https://reviews.llvm.org/D102049
      6b00b34b
    • Hsiangkai Wang's avatar
      [RISCV] Consider scalar types for required extensions. · c04c66d7
      Hsiangkai Wang authored
      We have vector operations on double vector and float scalar. For
      example, vfwadd.wf is such a instruction.
      
      vfloat64m1_t vfwadd_wf(vfloat64m1_t op0, float op1, size_t op2);
      
      We should specify F and D extensions for it.
      
      Differential Revision: https://reviews.llvm.org/D102051
      c04c66d7
    • Vyacheslav Zakharin's avatar
      An attempt to abandon omptarget out-of-tree builds. · f2f88f3e
      Vyacheslav Zakharin authored
      I want to start using LLVM component libraries in libomptarget
      to stop duplicating implementations already available in LLVM
      (e.g. LLVMObject, LLVMSupport, etc.). Without relying on LLVM
      in all libomptarget builds one has to provide fallback implementation
      for each used LLVM feature.
      
      This is an attempt to stop supporting out-of-llvm-tree builds of libomptarget.
      
      I understand that I may need to revert this,
      if this affects downstream projects in a bad way.
      
      Differential Revision: https://reviews.llvm.org/D101509
      f2f88f3e
    • Alexander Belyaev's avatar
      3444996b
    • Alexander Belyaev's avatar
    • Emilio Cota's avatar
      [mlir][docs] remove stale statement about index type in vectors · 21db1e3b
      Emilio Cota authored
      b614ada0 ("[mlir] add support for index type in vectors.") removed
      this limitation.
      
      Differential Revision: https://reviews.llvm.org/D102081
      21db1e3b
    • Arthur Eubanks's avatar
      7ca26c5f
    • Florian Hahn's avatar
      [SCEV] By more careful when traversing phis in isImpliedViaMerge. · 6c99e631
      Florian Hahn authored
      I think currently isImpliedViaMerge can incorrectly return true for phis
      in a loop/cycle, if the found condition involves the previous value of
      
      Consider the case in exit_cond_depends_on_inner_loop.
      
      At some point, we call (modulo simplifications)
      isImpliedViaMerge(<=, %x.lcssa, -1, %call, -1).
      
      The existing code tries to prove IncV <= -1 for all incoming values
      InvV using the found condition (%call <= -1). At the moment this succeeds,
      but only because it does not compare the same runtime value. The found
      condition checks the value of the last iteration, but the incoming value
      is from the *previous* iteration.
      
      Hence we incorrectly determine that the *previous* value was <= -1,
      which may not be true.
      
      I think we need to be more careful when looking at the incoming values
      here. In particular, we need to rule out that a found condition refers to
      any value that may refer to one of the previous iterations. I'm not sure
      there's a reliable way to do so (that also works of irreducible control
      flow).
      
      So for now this patch adds an additional requirement that the incoming
      value must properly dominate the phi block. This should ensure the
      values do not change in a cycle. I am not entirely sure if will catch
      all cases and I appreciate a through second look in that regard.
      
      Alternatively we could also unconditionally bail out in this case,
      instead of checking the incoming values
      
      Reviewed By: nikic
      
      Differential Revision: https://reviews.llvm.org/D101829
      6c99e631
    • Thomas Lively's avatar
      [WebAssembly] Use functions instead of macros for const SIMD intrinsics · 1e9c39a3
      Thomas Lively authored
      To improve hygiene, consistency, and usability, it would be good to replace all
      the macro intrinsics in wasm_simd128.h with functions. The reason for using
      macros in the first place was to enforce the use of constants for some arguments
      using `_Static_assert` with `__builtin_constant_p`. This commit switches to
      using functions and uses the `__diagnose_if__` attribute rather than
      `_Static_assert` to enforce constantness.
      
      The remaining macro intrinsics cannot be made into functions until the builtin
      functions they are implemented with can be replaced with normal code patterns
      because the builtin functions themselves require that their arguments are
      constants.
      
      This commit also fixes a bug with the const_splat intrinsics in which the f32x4
      and f64x2 variants were incorrectly producing integer vectors.
      
      Differential Revision: https://reviews.llvm.org/D102018
      1e9c39a3
    • Fangrui Song's avatar
      72460490
    • Krzysztof Parzyszek's avatar
      Allow empty value list in propagateMetadata(Inst, ArrayOf...) · 50cf0a1d
      Krzysztof Parzyszek authored
      This will allow writing
        propagateMetadata(Inst, collectInterestingValues(...))
      without concern about empty lists. In case of an empty list,
      Inst is returned without any changes.
      50cf0a1d
    • Fangrui Song's avatar
Loading