1. Aug 03, 2022
  2. Aug 02, 2022
    • Alok Kumar Sharma's avatar
      [clang][OpenMP][DebugInfo] Mark OpenMP generated functions as artificial · 5ec6ea3d
      Alok Kumar Sharma authored
      The Clang compiler generates internal functions for OpenMP. Current
      patch marks these functions as artificial.
      
      Reviewed By: aprantl
      
      Differential Revision: https://reviews.llvm.org/D111521
      5ec6ea3d
    • Philip Reames's avatar
      [LV] Recognize store of invariant value to invariant address as uniform · 0b47615f
      Philip Reames authored
      This extends the handling of uniform memory operations to handle the case where a store is storing a loop invariant value. Unlike the general case of a store to an invariant address where we must use the last active lane, in this case we can use any lane since all lanes must produce the same result.
      
      For context, the basic structure of the existing code and how the change fits in:
      * First, we select a widening strategy. (The result is irrelevant for this patch.)
      * Then we determine if a computation is uniform within all lanes of VF. (Note this is the uniform-per-part definition, not LAI's uniform across all unrolled iterations definition.)
      * If it is, we overrule the widening strategy, and unconditionally scalarize.
      * VPReplicationRecipe - which is what actually does the scalarization - knows how to handle unform-per-part values including for scalable vectors. However, we do need to know that the expression is safe to execute without predication - e.g. the uniform mem op was unconditional in the original loop. (This part was split off and already landed.)
      
      An obvious question is why not simply implement the generic case? The answer is that I'm going to, but doing so without a canonicalization towards uniform causes regressions due to bad interaction with scalarization/uniformity of values feeding the uniform mem-op. This patch is needed to avoid those regressions.
      
      Differential Revision: https://reviews.llvm.org/D130364
      0b47615f
    • Peixin Qiao's avatar
      [flang] Add some semantic checks for derived type with BIND attribute · 48b6f5c7
      Peixin Qiao authored
      This supports checks in C1801-C1805 for derived type with BIND attribute.
      The other compilers such as 'gfortran' and 'ifort' do not report error
      for C1802 and C1805, so emit warnings for them.
      
      Reviewed By: klausler
      
      Differential Revision: https://reviews.llvm.org/D130438
      48b6f5c7
    • Peixin Qiao's avatar
      [flang] Support extention intrinsic ABORT · 1f9212d8
      Peixin Qiao authored
      The semantic checks and runtime have been supported. This supports the
      lowering of intrinsic ABORT.
      
      `gfortran` prints a backtrace before abort, unless `-fno-backtrace` is
      given. This is good to use. The intrinsic BACKTRACE is not supported
      yet, so add TODO in the runtime.
      
      This extention is needed in SPEC2017 521.wrf_r in
      https://github.com/llvm/llvm-project/issues/55955.
      
      Reviewed By: klausler
      
      Differential Revision: https://reviews.llvm.org/D130439
      1f9212d8
    • Peixin Qiao's avatar
      [flang] Support lowering of intrinsic module procedure `c_loc` · 9b867928
      Peixin Qiao authored
      As Fortran 2018 18.2.3.6, the intrinsic `c_loc(x)` gets the C address
      of argument `x`. It returns the scalar of type C_PTR. As defined in
      iso_c_binding in `flang/module/__fortran_builtins.f90`, C_PTR is the
      derived type with only one component of integer 64.
      
      This supports the lowering of intrinsic module procedure `c_loc` by
      converting the address of argument into integer 64, where the argument
      is lowered as Box and the address is generated using fir.box_addr.
      
      The lowering of intrinsic `c_funloc` has the similar characteristic and
      will be supported later.
      
      The execution tests for various data types are in issue
      https://github.com/llvm/llvm-project/issues/56552.
      
      Reviewed By: Jean Perier
      
      Differential Revision: https://reviews.llvm.org/D129659
      9b867928
    • Phoebe Wang's avatar
      [X86][FP16] Fix vector_shuffle and lowering without f16c feature problems · 23021d4d
      Phoebe Wang authored
      The problem Alexander reported on D127982 was caused by an optimization
      for AVX512-FP16 instruction. We must limit it to the feature enabled only.
      
      During the investigation, I found we didn't expand for fp_round/fp_extend
      without F16C. This may result runtime crash, so change them too.
      
      Reviewed By: RKSimon
      
      Differential Revision: https://reviews.llvm.org/D130817
      23021d4d
    • Pavel Labath's avatar
      [lldb] Create an enum to specify the kind of ArchSpec matching · 6093a77c
      Pavel Labath authored
      s/true/ArchSpec::ExactMatch
      s/false/ArchSpec::CompatibleMatch
      
      Differential Revision: https://reviews.llvm.org/D121290
      6093a77c
    • Gabriel Ravier's avatar
      [lld] Fixed a number of typos · 5dbd8faa
      Gabriel Ravier authored
      I went over the output of the following mess of a command:
      
      `(ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode=none --ignore-case | grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n | grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less)`
      
      and proceeded to spend a few days looking at it to find probable typos
      and fixed a few hundred of them in all of the llvm project (note, the
      ones I found are not anywhere near all of them, but it seems like a
      good start).
      
      Differential Revision: https://reviews.llvm.org/D130982
      5dbd8faa
    • Aaron Ballman's avatar
      Revert "Missing tautological compare warnings due to unary operators" · c783ca0d
      Aaron Ballman authored
      This reverts commit 0cc3c184.
      
      The changes did not account for templated code where one instantiation
      may trigger the diagnostic but other instantiations will not, as in:
      ```
      template <int I, class T>
      void foo(int x) {
          bool b1 = (x & sizeof(T)) == 8;
          bool b2 = (x & I) == 8;
          bool b3 = (x & 4) == 8;
      }
      
      void run(int x) {
          foo<4, int>(8);
      }
      ```
      c783ca0d
    • Simon Tatham's avatar
      [yaml2obj] Add a `-E` flag to preprocess only. · 07e6eb6e
      Simon Tatham authored
      If you're having trouble getting a yaml2obj macro expansion to do what
      you want, it's useful to be able to print the output of the
      preprocessing to see what your macros expanded to //before// going
      into the YAML processing phase.
      
      yaml2obj has its own preprocessing system which isn't the same as any
      other well-known thing like cpp. So there's no way to do this macro
      expansion via another tool: yaml2obj will have to do it itself.
      
      In this commit I add an `-E` flag to yaml2obj to do that.
      
      Differential Revision: https://reviews.llvm.org/D130981
      07e6eb6e
    • Jay Foad's avatar
      [IRBuilder] CreateIntrinsic with implicit mangling · bb283241
      Jay Foad authored
      Add a new IRBuilderBase::CreateIntrinsic which takes the return type and
      argument values for the intrinsic call but does not take an explicit
      list of types to mangle. Instead the builder works this out from the
      intrinsic declaration and the types of the supplied arguments.
      
      This means that the mangling is hidden from the client, which in turn
      means that intrinsic definitions can change which arguments are mangled
      without requiring any changes to the client code.
      
      Differential Revision: https://reviews.llvm.org/D130776
      bb283241
    • David Green's avatar
      [AArch64] Fold Mul(And(Srl(X, 15), 0x10001), 0xffff) to CMLTz · 1206f72e
      David Green authored
      This folds a v4i32 Mul(And(Srl(X, 15), 0x10001), 0xffff) into a v8i16
      CMLTz instruction. The Srl and And extract the top bit (whether the
      input is negative) and the Mul sets all values in the i16 half to all
      1/0 depending on if that top bit was set. This is equivalent to a v8i16
      CMLTz instruction. The same applies to other sizes with equivalent
      constants.
      
      Differential Revision: https://reviews.llvm.org/D130874
      1206f72e
    • Muhammad Omair Javaid's avatar
      [LLDB] Skip buildbot failures AArch64/Windows · a1bf0c08
      Muhammad Omair Javaid authored
      TestInlineStepping.py is flaky while TestUseSourceCache.py fails on
      Windows 11 only. Marked them skipped to make buildbot happy.
      a1bf0c08
    • jacquesguan's avatar
      [mlir][Math] Add constant folder for TanhOp. · 008ea1c2
      jacquesguan authored
      This patch adds constant folder for TanhOp which only supports single and double precision floating-point.
      
      Differential Revision: https://reviews.llvm.org/D130960
      008ea1c2
    • David Green's avatar
      [AArch64] Mul fold tests for D130874. NFC · 29f97ec8
      David Green authored
      29f97ec8
    • Alex Zinenko's avatar
      [mlir] add TOC to top-level documents · 64bb0ae7
      Alex Zinenko authored
      Multiple top-level MLIR documents did not have a table of contents tag,
      making them harder to nagivate.
      64bb0ae7