Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/llvm/llvm-project.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
  1. Apr 06, 2022
    • Ting Wang's avatar
      [Clang][PowerPC] Add max/min intrinsics to Clang and PPC backend · b389354b
      Ting Wang authored
      Add support for builtin_[max|min] which has below prototype:
      A builtin_max (A1, A2, A3, ...)
      All arguments must have the same type; they must all be float, double, or long double.
      Internally use SelectCC to get the result.
      
      Reviewed By: qiucf
      
      Differential Revision: https://reviews.llvm.org/D122478
      b389354b
    • Matt Arsenault's avatar
      MachineVerifier: Diagnose undef set on full register defs · 634bf829
      Matt Arsenault authored
      An undef def of a full register would assert in LiveIntervalCalc.
      634bf829
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Handle legacy grid ID intrinsics · 54c525fc
      Matt Arsenault authored
      Handle the llvm.r600.* intrinsics which are still in use in libclc. I
      thought it would be possible to switch it to using
      llvm.amdgcn.implicitarg.ptr already, but it turns out the implicit
      arguments are currently split into a piece before and after the
      explicit kernel arguments.
      54c525fc
    • Matt Arsenault's avatar
      AMDGPU: Fix LiveVariables error after lowering SI_END_CF · 6071c927
      Matt Arsenault authored
      This wasn't accounting for the block change in updating LiveVariables.
      6071c927
    • zhongyunde's avatar
      [AArch64] Enhance last active true vector combine · 25163769
      zhongyunde authored
      Last active extracting will output LASTB + WHILELS, and the WHILELS itself
      is a flag-setting operation, so perform it preferly.
      
      Reviewed By: paulwalker-arm, sdesmalen
      
      Differential Revision: https://reviews.llvm.org/D122551
      25163769
    • Johannes Doerfert's avatar
      [Attributor] Remove broken and duplicated load simplification · 857bf306
      Johannes Doerfert authored
      We look through loads in the "generic value traversal" and we
      consequently don't need to look through them again in AAValueSimplify*.
      The test changes stem from the fact that we allowed any simplified
      value, incl. non-dynamically unique ones, as long as the underlying
      memory was an alloca. This doesn't seem to make sense as allocas do not
      protect against dynamically non-unique values. We need to make the
      unique check better rather than excluding allocas. That in mind, we can
      remove a lot of code by simply relying on the generic value traversal
      load look through.
      
      To soften the blow some minor adjustments have been made that allow more
      simplification through the now used scheme and some tests have been
      given a `norecurse` for now.
      857bf306
    • Johannes Doerfert's avatar
      [Attributor] Move recursion reasoning into `AA::isPotentiallyReachable` · a8610d75
      Johannes Doerfert authored
      With D106397 we ensured that `AAReachability` will not answer queries for
      potentially recursive functions. This was necessary as we did not treat
      recursion explicitly otherwise. Now that we have
      `AA::isPotentiallyReachable` we can make `AAReachability` a purely
      intra-procedural AA which does not care about recursion.
      `AA::isPotentiallyReachable`, however, does already deal with "going
      back" the call graph and can now do so for potentially recursive
      functions.
      a8610d75
    • Teresa Johnson's avatar
      [WPD] Add statistics · ced9a795
      Teresa Johnson authored
      Add statistics to count overall devirtualized targets as well as the
      various types of devirtualizations applied at callsites.
      
      Differential Revision: https://reviews.llvm.org/D123152
      ced9a795
    • Matt Arsenault's avatar
      MIRParser: Fix asserting with invalid flags on machine operands · ced1250b
      Matt Arsenault authored
      Constructing an operand with kills on defs and deads on uses asserts
      in the constructor, so diagnose these.
      ced1250b
    • Gulfem Savrun Yeniceri's avatar
      Revert "[InstrProfiling] No runtime hook for unused funcs" · bcf8f218
      Gulfem Savrun Yeniceri authored
      This reverts commit c7f91e22.
      This patch caused an issue in Fuchsia source code coverage builders.
      bcf8f218
    • Jun Zhang's avatar
      [Clang][Sema] Prohibit statement expression in the default argument · 8a4d388c
      Jun Zhang authored
      As statement expression makes no sense in the default argument,
      this patch tries to disable it in the all cases.
      
      Please note that the statement expression is a GNU extension, which
      means that Clang should be consistent with GCC. However, there's no
      response from GCC devs since we have raised the issue for several weeks.
      In this case, I think we can disallow statement expressions as a default
      parameter in general for now, and relax the restriction if GCC folks
      decide to retain the feature for functions but not lambdas in the
      future.
      
      Related discussion: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104765
      
      Fixes https://github.com/llvm/llvm-project/issues/53488
      
      Differential Revision: https://reviews.llvm.org/D119609
      Unverified
      8a4d388c
    • Yuanfang Chen's avatar
      [unittests] fix intermittent SupportTests failures · c32f8f34
      Yuanfang Chen authored
      by invoking `SupportTests --gtest_shuffle=1`.
      
      `HideUnrelatedOptions`/`HideUnrelatedOptionsMulti` failed due to other
      tests calling `cl::ResetCommandLineParser()` which causes default
      options to be removed.
      
      `ExitOnError` would hang due to the threading environment. Renaming it
      as `*Deathtest` is the recommended practice by GTest docs.
      c32f8f34
    • Aart Bik's avatar
      [mlir][sparse] avoid reserving dense storage for ptr/idx · 175b9af4
      Aart Bik authored
      This avoids a rather big bug where we were reserving
      dense space for the ptx/idx in the first sparse dimension.
      For example, using CSR for a 140874 x 140874 matrix with
      3977139 nonzero would reserve the full 19845483876 space.
      This revision fixes this for now, but we need to revisit
      the reservation heuristic to make this better.
      
      Reviewed By: bixia
      
      Differential Revision: https://reviews.llvm.org/D123166
      175b9af4
    • Lang Hames's avatar
      [JITLink][MachO] Fix alignment bug in the c-string literal section graphifier. · 9a62d9db
      Lang Hames authored
      This function had been assuming a 1-byte alignment, which isn't always correct.
      This commit updates it to take the alignment from the __cstring section.
      
      The key change is to the createContentBlock call, but the surrounding code is
      updated with clearer debugging output to support the testcase (and any future
      debugging work).
      9a62d9db
    • John Demme's avatar
      [MLIR] [Python] Pybind adaptors: coerce None to default MlirLocation · 94d96c2a
      John Demme authored
      Add default source location coercion to enable location elision in
      Python code.
      94d96c2a
    • Tom Honermann's avatar
      [clang] Corrections for target_clones multiversion functions. · 5531abaf
      Tom Honermann authored
      This change merges code for emit of target and target_clones multiversion
      resolver functions and, in doing so, corrects handling of target_clones
      functions that are declared but not defined. Previously, a use of such
      a target_clones function would result in an attempted emit of an ifunc
      that referenced an undefined resolver function. Ifunc references to
      undefined resolver functions are not allowed and, when the LLVM verifier
      is not disabled (via '-disable-llvm-verifier'), resulted in the verifier
      issuing a "IFunc resolver must be a definition" error and aborting the
      compilation. With this change, ifuncs and resolver function definitions
      are always emitted for used target_clones functions regardless of whether
      the target_clones function is defined (if the function is defined, then
      the ifunc and resolver are emitted regardless of whether the function is
      used).
      
      This change has the side effect of causing target_clones variants and
      resolver functions to be emitted in a different order than they were
      previously. This is harmless and is reflected in the updated tests.
      
      Reviewed By: erichkeane
      
      Differential Revision: https://reviews.llvm.org/D122958
      5531abaf
    • Tom Honermann's avatar
      [clang] NFC: Preparation for merging code to emit target and target_clones resolvers. · 40af8df6
      Tom Honermann authored
      This change modifies CodeGenModule::emitMultiVersionFunctions() in preparation
      for a change that will merge support for emitting target_clones resolvers into
      this function. This change mostly serves to isolate indentation changes from
      later behavior modifying changes.
      
      Reviewed By: erichkeane
      
      Differential Revision: https://reviews.llvm.org/D122957
      40af8df6
    • Tom Honermann's avatar
      [clang] NFC: Simplify the interface to CodeGenModule::GetOrCreateMultiVersionResolver(). · 0ace0100
      Tom Honermann authored
      Previously, GetOrCreateMultiVersionResolver() required the caller to provide
      a GlobalDecl along with an llvm::type and FunctionDecl. The latter two can be
      cheaply obtained from the first, and the llvm::type parameter is not always
      used, so requiring the caller to provide them was unnecessary and created the
      possibility that callers would pass an inconsistent set. This change simplifies
      the interface to only require the GlobalDecl value.
      
      Reviewed By: erichkeane
      
      Differential Revision: https://reviews.llvm.org/D122956
      0ace0100
    • Tom Honermann's avatar
      [clang] NFC: Enhance comments in CodeGen for multiversion function support. · bed5ee3f
      Tom Honermann authored
      Reviewed By: erichkeane
      
      Differential Revision: https://reviews.llvm.org/D122955
      bed5ee3f
    • Louis Dionne's avatar
      [libc++] Remove error about _LIBCPP_ALTERNATE_STRING_LAYOUT not being supported anymore · 6720bc20
      Louis Dionne authored
      It's been over two years since I added the temporary error, so I think
      it's reasonable to remove it now.
      6720bc20
    • Louis Dionne's avatar
      fd92ca00
    • Johannes Doerfert's avatar
      [Attributor] Visit droppable uses in AAIsDead · 3e8c4366
      Johannes Doerfert authored
      If we ignore droppable users everything only used in llvm.assume (among
      other things) is going to be deleted as dead. This is not helpful.
      Instead we want to only delete things we actually don't need anymore. A
      follow up will deal with loads in a smarter way.
      3e8c4366
    • Johannes Doerfert's avatar
      dd92b29e
    • Jorge Gorbe Moya's avatar
      Fix bazel build. · 54cc7de4
      Jorge Gorbe Moya authored
      - https://reviews.llvm.org/D122619 bumped zlib version but didn't change
        the hash
      
      - Added new header from https://reviews.llvm.org/D108438
      54cc7de4
    • Jessica Paquette's avatar
      [GlobalISel] NFC: Add test coverage for s144 and s142 · 6c9bc2dd
      Jessica Paquette authored
      144 = 16 * 9
      
      For types where s16 is legal.
      
      It may be interesting to break these down into 16-bit chunks rather than 32
      or 64 bits.
      
      Add tests for some opcodes, just so we get some test coverage drawing attention
      to this.
      6c9bc2dd
    • Jonas Devlieghere's avatar
    • Greg Clayton's avatar
      Disable LLDB index cache for .o files with no UUID. · b6087ba7
      Greg Clayton authored
      After enabling the LLDB index cache in production we discovered that some distributed build systems play with the modification times of any .o files that were downloaded from the build cache. This was causing the LLDB index cache to read the wrong cache file for files that didn't have a UUID as all of the modfication times were set to the same value by the build system. When new .o files were downloaded, the only unique identifier was the mod time which were all the same, and we would load an older cache for the updated .o file. So disabling caching of files that have no UUIDs for now until we can create a more solid solution.
      
      Differential Revision: https://reviews.llvm.org/D120948
      b6087ba7
    • Jessica Paquette's avatar
      [GlobalISel] NFC: Add some test coverage for s158 · 30922d62
      Jessica Paquette authored
      158 = 32 * 5 - 2
      
      This is a wide type which may benefit from a different widening scheme than
      types which are multiples of 64. For example, if 32-bit and 64-bit scalars
      are both allowed, and a type is a multiple of 32, or is closer to a multiple
      of 32, it *may* be better to
      
      - Widen to the wide multiple of 32
      - Break up the type into 32-bit chunks
      
      Anyway, we don't have any test coverage for this at all, so for the sake of
      making sure we test it, let's add some test coverage.
      30922d62
    • William Woodruff's avatar
      [NFC][Bitstream] Improve the dumpability of bitstream/bitcode headers · d81b0144
      William Woodruff authored
      The `LLVMBitCodes.h` header contains various enums that are updated whenever LLVM's bitcode fundamentally changes. It would be nice to track these changes in a semi-automated way, so that external tools that attempt to parse LLVM's bitstream and bitcode can remain in sync.
      
      Before this change, `LLVMBitCodes.h` had a single dependency -- it needed the `FIRST_APPLICATION_BLOCKID` enum value from `BitCodes.h`. `BitCodes.h`, in turn, had a whole tree of include dependencies that boiled down to `llvm-config.h`, meaning that it was impossible to dump the AST of either file without having a partial or full LLVM build tree already present.
      
      To eliminate that requirement, this patch introduces a new leaf-only header, `BitCodeEnums.h`, which includes the "core" enums originally in `BitCodes.h`. `LLVMBitCodes.h` and `BitCodes.h` both include this new header in turn, preserving the current header relationships while allowing `LLVMBitCodes.h` to be dumped fully independently with a command like this (run from the repository root):
      
      ```
      clang -fsyntax-only -x c++ -Illvm/include -Xclang -ast-dump=json -Xclang -ast-dump-filter -Xclang llvm::bitc::BlockIDs llvm/include/llvm/Bitcode/LLVMBitCodes.h
      ```
      
      I recognize that this is a pretty unusual change and perhaps not a guarantee that the LLVM authors would like to make in the general case (i.e., that individual files within LLVM can have their AST dumped with minimal dependencies). However, I believe the criticality/limited scope of the file(s) in this patch warrants an exception. Please let me know if there's any other information I can provide, or anything else I can do to improve this patch!
      
      Reviewed By: tejohnson
      
      Differential Revision: https://reviews.llvm.org/D108438
      d81b0144
    • Hanhan Wang's avatar
      Revert "[mlir] Rewrite canonicalization of collapse(expand) and expand(collapse)." · 96e9b6c9
      Hanhan Wang authored
      This reverts commit 64f659be.
      
      An invalid tensor.expand_shape op is generated with the commit. To repro:
      
      $ mlir-opt -canonicalize a.mlir
      
      ```
      func @foo(%0: tensor<1x1xf32>, %1: tensor<1x1xf32>, %2: tensor<1x1xf32>) -> tensor<1x1xf32> {
        %cst = arith.constant 0.000000e+00 : f32
        %3 = linalg.init_tensor [8, 1] : tensor<8x1xf32>
        %4 = linalg.fill ins(%cst : f32) outs(%3 : tensor<8x1xf32>) -> tensor<8x1xf32>
        %5 = tensor.collapse_shape %0 [] : tensor<1x1xf32> into tensor<f32>
        %6 = tensor.insert_slice %5 into %4[0, 0] [1, 1] [1, 1] : tensor<f32> into tensor<8x1xf32>
        %7 = linalg.init_tensor [8, 1] : tensor<8x1xf32>
        %8 = linalg.fill ins(%cst : f32) outs(%7 : tensor<8x1xf32>) -> tensor<8x1xf32>
        %9 = tensor.collapse_shape %2 [] : tensor<1x1xf32> into tensor<f32>
        %10 = tensor.insert_slice %9 into %8[0, 0] [1, 1] [1, 1] : tensor<f32> into tensor<8x1xf32>
        %11 = tensor.collapse_shape %6 [[0, 1]] : tensor<8x1xf32> into tensor<8xf32>
        %12 = linalg.init_tensor [8] : tensor<8xf32>
        %13 = linalg.generic {indexing_maps = [affine_map<(d0) -> (d0)>, affine_map<(d0) -> (d0)>], iterator_types = ["parallel"]} ins(%11 : tensor<8xf32>) outs(%12 : tensor<8xf32>) {
        ^bb0(%arg3: f32, %arg4: f32):
          linalg.yield %arg3 : f32
        } -> tensor<8xf32>
        %14 = tensor.expand_shape %13 [[0, 1, 2, 3]] : tensor<8xf32> into tensor<1x1x8x1xf32>
        %15 = tensor.collapse_shape %1 [] : tensor<1x1xf32> into tensor<f32>
        %16 = linalg.init_tensor [] : tensor<f32>
        %17 = linalg.generic {indexing_maps = [affine_map<() -> ()>, affine_map<() -> ()>], iterator_types = []} ins(%15 : tensor<f32>) outs(%16 : tensor<f32>) {
        ^bb0(%arg3: f32, %arg4: f32):
          linalg.yield %arg3 : f32
        } -> tensor<f32>
        %18 = tensor.expand_shape %17 [] : tensor<f32> into tensor<1x1x1x1xf32>
        %19 = tensor.collapse_shape %10 [[0, 1]] : tensor<8x1xf32> into tensor<8xf32>
        %20 = linalg.init_tensor [8] : tensor<8xf32>
        %21 = linalg.generic {indexing_maps = [affine_map<(d0) -> (d0)>, affine_map<(d0) -> (d0)>], iterator_types = ["parallel"]} ins(%19 : tensor<8xf32>) outs(%20 : tensor<8xf32>) {
        ^bb0(%arg3: f32, %arg4: f32):
          linalg.yield %arg3 : f32
        } -> tensor<8xf32>
        %22 = tensor.expand_shape %21 [[0, 1, 2, 3]] : tensor<8xf32> into tensor<1x1x8x1xf32>
        %23 = linalg.mmt4d {comment = "f32*f32->f32, aarch64, matrix*vector"} ins(%14, %18 : tensor<1x1x8x1xf32>, tensor<1x1x1x1xf32>) outs(%22 : tensor<1x1x8x1xf32>) -> tensor<1x1x8x1xf32>
        %24 = tensor.collapse_shape %23 [[0, 1, 2, 3]] : tensor<1x1x8x1xf32> into tensor<8xf32>
        %25 = linalg.init_tensor [8] : tensor<8xf32>
        %26 = linalg.generic {indexing_maps = [affine_map<(d0) -> (d0)>, affine_map<(d0) -> (d0)>], iterator_types = ["parallel"]} ins(%24 : tensor<8xf32>) outs(%25 : tensor<8xf32>) {
        ^bb0(%arg3: f32, %arg4: f32):
          linalg.yield %arg3 : f32
        } -> tensor<8xf32>
        %27 = tensor.expand_shape %26 [[0, 1]] : tensor<8xf32> into tensor<8x1xf32>
        %28 = tensor.extract_slice %27[0, 0] [1, 1] [1, 1] : tensor<8x1xf32> to tensor<f32>
        %29 = tensor.expand_shape %28 [] : tensor<f32> into tensor<1x1xf32>
        return %29 : tensor<1x1xf32>
      }
      ```
      
      Differential Revision: https://reviews.llvm.org/D123161
      96e9b6c9
    • Jonas Devlieghere's avatar
    • Benjamin Kramer's avatar
    • Groverkss's avatar
      [MLIR][Affine][Analysis] Merge FAC and FACV · 0a06ac74
      Groverkss authored
      With the introduction of IntegerPolyhedron and IntegerRelation in Presburger
      directory, the purpose of FlatAffineConstraints becomes redundant. For users
      requiring Presburger arithmetic without IR information, Presburger library can
      directly be used. For users requiring IR information,
      FlatAffineValueConstraints can be used.
      
      This patch merges FAC and FACV to remove redundancy of FAC.
      
      Reviewed By: arjunp
      
      Differential Revision: https://reviews.llvm.org/D122476
      0a06ac74
    • Amir Ayupov's avatar
      [BOLT][NFC] Move isADD64rr and isADDri out of MCPlusBuilder class · f99398fe
      Amir Ayupov authored
      Reviewed By: rafauler
      
      Differential Revision: https://reviews.llvm.org/D123077
      f99398fe
    • David Blaikie's avatar
      DebugInfo: ThinLTO: Import template parameters on type declarations · 6302a914
      David Blaikie authored
      Necessary when importing class template specializations that have
      simplified template names (may otherwise be necessary - eg: Sony
      requires template parameter DIEs even with unsimplified names, but short
      of always importing names this is the best I can do for now) - long term
      this probably needs a flag for the DICompositeType to specify whether it
      needs template parameters on declarations & that flag could power this
      behavior, rather than inspecting the name.
      6302a914
    • Jonas Devlieghere's avatar
      [lldb] Add missing const to NativeRegisterContextLinux_x86_64 · ed9a14f9
      Jonas Devlieghere authored
      Fixes error: invalid conversion from ‘const uint8_t*’ {aka ‘const
      unsigned char*’} to ‘uint8_t*’ {aka ‘unsigned char*’}
      Unverified
      ed9a14f9
    • Ben Barham's avatar
      Revert "[VFS] RedirectingFileSystem only replace path if not already mapped" · f65b0b5d
      Ben Barham authored
      This reverts commit 3fda0edc, which
      breaks crash reproducers in very specific circumstances. Specifically,
      since crash reproducers have `UseExternalNames` set to false, the
      `File->getFileEntry().getDir()->getName()` call in `DoFrameworkLookup`
      would use the *cached* directory name instead of the directory of the
      looked-up file.
      
      The plan is to re-commit this patch but to *add*
      `ExposesExternalVFSPath` rather than replace `IsVFSMapped`.
      
      Differential Revision: https://reviews.llvm.org/D123103
      f65b0b5d
    • Jonas Devlieghere's avatar
    • Paul Robinson's avatar
      [PS4] Fix header search list · 1e085448
      Paul Robinson authored
      A missing "break" in the initial implementation had us adding a
      spurious "/usr/include" to the header search list. Later someone
      introduced LLVM_FALLTHROUGH to prevent a warning.  Replace this with
      the correct "break" and make sure the extra directory isn't added to
      the PS4 header search list.
      1e085448
    • Shangwu Yao's avatar
      Emit OpenCL metadata when targeting SPIR-V · 15a17696
      Shangwu Yao authored
      This is required for converting function calls such as get_global_id()
      into SPIR-V builtins.
      
      Differential Revision: https://reviews.llvm.org/D123049
      15a17696
Loading