1. Apr 22, 2023
    • Nathan Sidwell's avatar
      [BOLT] Remove unneeded dyncasts · ffb42e31
      Nathan Sidwell authored
      These checks are unnecessary -- we've already bailed if the format was wrong.
      
      Reviewed By: rafauler
      
      Differential Revision: https://reviews.llvm.org/D148848
      ffb42e31
    • Jan Svoboda's avatar
      [clang] NFCI: Optimize storage and lookup of analyzer options · 53a4a2b4
      Jan Svoboda authored
      This patch moves `llvm::sort()` from `AnalyzerOptions` constructor to initialization of local static variable in `isUnknownAnalyzerConfig()`.
      
      This avoids unnecessary work, which can speed up Clang tools that initialize lots of `CompilerInvocation`s (and therefore `AnalyzerOptions`).
      
      Reviewed By: steakhal
      
      Differential Revision: https://reviews.llvm.org/D137258
      53a4a2b4
    • David Green's avatar
      [DAG][AArch64] Limit preferIncOfAddToSubOfNot until after legalization if the node has wrap flags · 33fe899c
      David Green authored
      If the add node has wrap flags then they will be destroyed by converting to
      sub/not. The flags can be useful in converting to rhadd, for example, but that
      may be required late if the node types need to be legalized. This limits the
      preferIncOfAddToSubOfNot fold until after legalize DAG if the node have flags
      to allow more folding.
      
      Differential Revision: https://reviews.llvm.org/D148809
      33fe899c
    • Aaron Ballman's avatar
      Revert "[clang] trigger -Wcast-qual on functional casts" · 7f00ecd0
      Aaron Ballman authored
      This reverts commit 7c002192.
      
      It broke post-commit buildbots:
      https://lab.llvm.org/buildbot/#/builders/37/builds/21631
      7f00ecd0
    • Jonas Devlieghere's avatar
      [lldb] Let Mangled decide whether a name is mangled or not · c1d55d26
      Jonas Devlieghere authored
      We have a handful of places in LLDB where we try to outsmart the logic
      in Mangled to determine whether a string is mangled or not. There's at
      least one place (*) where we are getting this wrong and causes a subtle
      bug. The `cstring_is_mangled` is cheap enough that we should always rely
      on it to determine whether a string is mangled or not.
      
      (*) `ObjectFileMachO` assumes that a symbol that starts with a double
      underscore (such as `__pthread_kill`) is mangled. That's mostly
      harmless, until you use `function.name-without-args` in the frame
      format. The formatter calls `Symbol::GetNameNoArguments()` which is a
      wrapper around `Mangled::GetName(ePreferDemangledWithoutArguments)`. The
      latter will first try using the appropriate language plugin to get the
      demangled name without arguments, and if that fails, falls back to
      returning the demangled name. Because we forced Mangled to treat the
      symbol as a mangled name (even though it's not) there's no demangled
      name. The result is that frames don't show any symbol at all.
      
      Differential revision: https://reviews.llvm.org/D148846
      c1d55d26
    • Razvan Lupusoru's avatar
      [mlir][openacc] Add descriptions for new acc data operations · 482c1dfe
      Razvan Lupusoru authored
      The acc.bounds operation now clarifies that it is meant to be
      zero-based. I added example for both C++ and Fortran to
      show the normalized representation.
      
      I also added description for each operand in the data entry
      and data exit operations.
      
      Reviewed By: clementval
      
      Differential Revision: https://reviews.llvm.org/D148860
      482c1dfe
    • Momchil Velikov's avatar
      [NFC][CodeGenPrepare] Match against the correct instruction when checking... · 4f02a0f6
      Momchil Velikov authored
      [NFC][CodeGenPrepare] Match against the correct instruction when checking profitability of folding an address
      
      The "nested" `AddressingModeMatcher`s in
      `AddressingModeMatcher::isProfitableToFoldIntoAddressingMode` are constructed
      using the original memory instruction, even though they check whether the
      address operand of a differrent memory instructon is foldable. The memory
      instruction is used only for a dominance check (when not checking for
      profitability), and using the wrong memory instruction does not change the
      outcome of the test - if an address is foldable, the dominance test afects which
      of the two possible ways to fold is chosen, but this result is discarded.
      
      As an example, in
      
          target triple = "x86_64-linux"
      
          declare i1 @check(i64, i64)
          define i32 @f(i1 %cc, ptr %p, ptr %q, i64 %n) {
          entry:
            br label %loop
      
          loop:
            %iv = phi i64 [ %i, %C ], [ 0, %entry ]
            %offs = mul i64 %iv, 4
      
            %c.0 = icmp  ult i64 %iv, %n
            br i1 %c.0, label %A, label %fail
      
          A:
            br i1 %cc, label %B, label %C
      
          C:
            %u = phi i32 [0, %A], [%w, %B]
            %i = add i64 %iv, 1
            %a.0 = getelementptr i8, ptr %p, i64 %offs
            %a.1 = getelementptr i8, ptr %a.0, i64 4
            %v = load i32, ptr %a.1
            %c.1 = icmp eq i32 %v, %u
            br i1 %c.1, label %exit, label %loop
      
          B:
            %a.2 = getelementptr i8, ptr %p, i64 %offs
            %a.3 = getelementptr i8, ptr %a.2, i64 4
            %w = load i32, ptr %a.3
            br label %C
      
          exit:
            ret i32 -1
      
          fail:
             ret i32 0
          }
      
      the dominance test is perfomed between `%i = ...` and `%v = ...` at the moment
      we're checking whether `%a3 = ...` is foldable
      
      Using the memory instruction, which uses the interesting address is "more
      correct" and this change is needed by a future patch.
      
      Reviewed By: mkazantsev
      
      Differential Revision: https://reviews.llvm.org/D143896
      4f02a0f6
    • Nathan Sidwell's avatar
      [BOLT] Add BOLT_TARGETS_TO_BUILD · f84ac48f
      Nathan Sidwell authored
      Adds BOLT_TARGETS_TO_BUILD, which defaults to the intersection of
      X86;AArch64 and LLVM_TARGETS_TO_BUILD, but allows configuration to
      alter that -- for instance omitting one of those two targets even if
      llvm supports both.
      
      Reviewed By: rafauler
      
      Differential Revision: https://reviews.llvm.org/D148847
      f84ac48f
    • Lei Zhang's avatar
      [mlir][vector] NFC: Expose castAwayContractionLeadingOneDim · eca7698a
      Lei Zhang authored
      This commit exposes the transformation behind the pattern.
      It is useful for more targeted application on a specific op
      for once.
      
      Reviewed By: kuhar
      
      Differential Revision: https://reviews.llvm.org/D148758
      eca7698a
    • Eric Gouriou's avatar
      [RISCV] NFC tweaks in extension descriptions, sorting · ca554ad7
      Eric Gouriou authored
      NFC changes in RISCISAInfo and RISCFeatures, and matching updates to the
      MC tests.
      
      - Drop the '.' in the parentheses section of the Zvk extension
        descriptions. This is supported by
      <https://www.masterclass.com/articles/period-inside-or-outside-parentheses#>,
      - Remove an extraneous space in the description of Zvt,
      - Reorder the ImpliedExts.* constant literals in RISCISAInfo.cpp, as
        suggested in <https://reviews.llvm.org/D148483>.
      
      Differential Revision: https://reviews.llvm.org/D148857
      ca554ad7
    • Nathan Sidwell's avatar
      [BOLT] Robustify compile-time config check · 1c3653df
      Nathan Sidwell authored
      The BOLT runtime is specifically hard coded for x86_64 linux or x86_64
      darwin. (Using x86_64 syscalls, hardcoding syscall numbers.)
      
      Make it very clear this is for those specific pair of systems.
      
      Reviewed By: rafauler
      
      Differential Revision: https://reviews.llvm.org/D148825
      1c3653df
    • Zibi Sarbinowski's avatar
      [SystemZ][z/OS] Make LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL available for external unwind library. · ff46b844
      Zibi Sarbinowski authored
      On z/OS, we need to pass the location of unwind interface header when building cxxabi. The cmake macro `LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL` is available for this purpose but it is only used with conjunction with `LIBCXXABI_USE_LLVM_UNWINDER`. For the external unwind library we need to use LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL unconditionally whenever it is set.
      
      Reviewed By: #libc_abi, muiez, phosek, SeanP
      
      Differential Revision: https://reviews.llvm.org/D147460
      ff46b844
    • Aart Bik's avatar
      [mlir][sparse][gpu] generate proper memcpy in/out host and device · 86888e42
      Aart Bik authored
      The host registration is a convenient way to get CUDA kernels
      running, but it may be slow and does not work for all buffer
      (like global constants). This revision uses the proper alloc
      copy dealloc chains for buffers, using asynchronous chains
      to increase overlap. The host registration mechanism is
      kept under a flag for the output, just for experimentation
      purposes while this project ramps up.
      
      Reviewed By: Peiming
      
      Differential Revision: https://reviews.llvm.org/D148682
      86888e42
    • Alexey Bataev's avatar
      [SLP]Fix the cost for the extractelements, used in several nodes. · 851a1213
      Alexey Bataev authored
      Currently the compiler calculates the compensation cost for the
      extractelements, removed during vectorization. But if the extractelement
      instruction is used in several nodes, we can calculate the compensation
      for them several times.
      
      Differential Revision: https://reviews.llvm.org/D148806
      851a1213
    • Nikita Popov's avatar
      [LV][IndVars] Move test to correct directory and regenerate (NFC) · d003c01c
      Nikita Popov authored
      For some reason, an IndVarSimplify test was in the LoopVectorize
      directory.
      d003c01c
  2. Apr 21, 2023