1. Jul 13, 2022
  2. Jul 12, 2022
    • Chuanqi Xu's avatar
      [AST] Accept identical TypeConstraint referring to other template · f6b0ae14
      Chuanqi Xu authored
      parameters.
      
      The current implementation to judge the similarity of TypeConstraint in
      ASTContext::isSameTemplateParameter is problematic, it couldn't handle
      the following case:
      
      ```C++
      template <__integer_like _Tp, C<_Tp> Sentinel>
      constexpr _Tp operator()(_Tp &&__t, Sentinel &&last) const {
          return __t;
      }
      ```
      
      When we see 2 such declarations from different modules, we would judge
      their similarity by `ASTContext::isSame*` methods. But problems come for
      the TypeConstraint. Originally, we would profile each argument one by
      one. But it is not right. Since the profiling result of `_Tp` would
      refer to two different template type declarations. So it would get
      different results. It is right since the `_Tp` in different modules
      refers to different declarations indeed. So the same declaration in
      different modules would meet incorrect our-checking results.
      
      It is not the thing we want. We want to know if the TypeConstraint have
      the same expression.
      
      Reviewer: vsapsai, ilya-biryukov
      
      Differential Revision: https://reviews.llvm.org/D129068
      f6b0ae14
    • Jay Foad's avatar
      [AMDGPU] SILowerControlFlow uses LiveIntervals · 5d41fe07
      Jay Foad authored
      The availability of LiveIntervals affects kill flags in the output, so
      declare the use to avoid strange effects where the output of this pass
      is different depending on what other passes are scheduled after it.
      
      Differential Revision: https://reviews.llvm.org/D129555
      5d41fe07
    • Joseph Huber's avatar
      [LinkerWrapper] Clean-up unused definitions · 1586b595
      Joseph Huber authored
      Summary:
      
      There are a few definitions that are unused or unnecessary after
      previous changes, clean them up.
      1586b595
    • Joseph Huber's avatar
      [LinkerWrapper] Make ThinLTO work inside the linker wrapper · 86a49a4f
      Joseph Huber authored
      Summary:
      Previous assumptions held that the LTO stage would only have a single
      output. This is incorrect when using thinLTO which outputs multiple
      files. Additionally there were some bugs with how we hanlded input that
      cause problems when performing thinLTO. This patch addresses these
      issues.
      
      The performance of Thin-LTO is currently pretty bad. But I am content to
      leave it that way as long as it compiles.
      86a49a4f
    • Chuanqi Xu's avatar
      [Modules] Add ODR Check for concepts · 4b95a5a7
      Chuanqi Xu authored
      Closing https://github.com/llvm/llvm-project/issues/56310
      
      Previously we don't check the contents of concept so it might merge
      inconsistent results.
      
      Important Note: this patch might break existing code but the behavior
      might be right.
      
      Reviewed By: erichkeane
      
      Differential Revision: https://reviews.llvm.org/D129104
      4b95a5a7
    • Kai Nacke's avatar
      [GISel] Check useLoadStackGuardNode() before generating LOAD_STACK_GUARD · 42f7364f
      Kai Nacke authored
      When lowering llvm::stackprotect intrinsic, the SDAG implementation
      checks useLoadStackGuardNode() to either create a LOAD_STACK_GUARD or use
      the first argument of the intrinsic. This check is not present in the
      IRTranslator, which results in always generating a LOAD_STACK_GUARD even
      if the target does not support it.
      
      Reviewed By: arsenm
      
      Differential Revision: https://reviews.llvm.org/D129505
      42f7364f
    • Slava Zakharin's avatar
      [flang] Lower TRANSPOSE without using runtime. · a280043b
      Slava Zakharin authored
      Calling runtime TRANSPOSE requires a temporary array for the result,
      and, sometimes, a temporary array for the argument. Lowering it inline
      should provide faster code.
      
      I added -opt-transpose control just for debugging purposes temporary.
      I am going to make driver changes that will disable inline lowering
      for -O0. For the time being I would like to enable it by default
      to expose the code to more tests.
      
      Differential Revision: https://reviews.llvm.org/D129497
      a280043b
    • Krzysztof Drewniak's avatar
      [mlir] Remove VectorToROCDL · d6ef3d20
      Krzysztof Drewniak authored
      Between issues such as
      https://github.com/llvm/llvm-project/issues/56323, the fact that this
      lowering (unlike the code in amdgpu-to-rocdl) does not correctly set
      up bounds checks (and thus will cause page faults on reads that might
      need to be padded instead), and that fixing these problems would,
      essentially, involve replicating amdgpu-to-rocdl, remove
      --vector-to-rocdl for being broken. In addition, the lowering does not
      support many aspects of transfer_{read,write}, like supervectors, and
      may not work correctly in their presence.
      
      We (the MLIR-based convolution generator at AMD) do not use this
      conversion pass, nor are we aware of any other clients.
      
      Migration strategies:
      - Use VectorToLLVM
      - If buffer ops are particularly needed in your application, use
      amdgpu.raw_buffer_{load,store}
      
      A VectorToAMDGPU pass may be introduced in the future.
      
      Reviewed By: ThomasRaoux
      
      Differential Revision: https://reviews.llvm.org/D129308
      d6ef3d20
    • Ben Langmuir's avatar
      [clang][deps] Override dependency and serialized diag files for modules · 6626f6fe
      Ben Langmuir authored
      When building modules, override secondary outputs (dependency file,
      dependency targets, serialized diagnostic file) in addition to the pcm
      file path. This avoids inheriting per-TU command-line options that
      cause non-determinism in the results (non-deterministic command-line for
      the module build, non-determinism in which TU's .diag and .d files will
      contain the module outputs). In clang-scan-deps we infer whether to
      generate dependency or serialized diagnostic files based on an original
      command-line. In a real build system this should be modeled explicitly.
      
      Differential Revision: https://reviews.llvm.org/D129389
      6626f6fe
    • Paul Robinson's avatar
      [PS4/PS5] NFC: Use preferred predicate in a triple check · 2b9055ce
      Paul Robinson authored
      Also add a test to verify this difference in the PS4/PS5 ABIs,
      now that we have identified it.
      2b9055ce