1. Aug 04, 2020
    • Juneyoung Lee's avatar
    • Luboš Luňák's avatar
      [lldb] fix typo · daa1c6d9
      Luboš Luňák authored
      daa1c6d9
    • Georgii Rymar's avatar
      [llvm-readobj] - A third attempt to fix BB. · 4e424384
      Georgii Rymar authored
      http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/15718/steps/build%20stage%201/logs/stdio:
      
      FAILED: /usr/bin/c++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/llvm-readobj -I/home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj -Iinclude -I/home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/include -march=broadwell -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3     -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -MT tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o -MF tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o.d -o tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o -c /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp: In function ‘llvm::Expected<const llvm::object::Elf_Mips_Options<ELFT>*> readMipsOptions(const uint8_t*, llvm::ArrayRef<unsigned char>&, bool&)’:
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3374:12: error: parse error in template argument list
           if (O->size < ExpectedSize)
      
      Note: I played with godbolt.org and was able to catch the similar "error in template argument list" error when used gcc 4.9.0 with this code.
      Fix: try to introduce a variable to store `O->size`, it helped to me in godbolt.
      4e424384
    • David Green's avatar
      [BasicAA] Enable -basic-aa-recphi by default · 3c7e7d40
      David Green authored
      This option was added a while back, to help improve AA around pointer
      phi loops. It looks for phi(gep(phi, const), x) loops, checking if x can
      then prove more precise aliasing info.
      
      Differential Revision: https://reviews.llvm.org/D82998
      3c7e7d40
    • Meera Nakrani's avatar
      [ARM] Generated SSAT and USAT instructions with shift · 20283ff4
      Meera Nakrani authored
      Added patterns so that both SSAT and USAT instructions are generated with shifts. Added corresponding regression tests.
      
      Differential Review: https://reviews.llvm.org/D85120
      20283ff4
    • Simon Pilgrim's avatar
      Revert rG66e7dce7 "Revert "[X86][SSE] Shuffle combine blends to OR(X,Y)... · 47cea9e8
      Simon Pilgrim authored
      Revert rG66e7dce7 "Revert "[X86][SSE] Shuffle combine blends to OR(X,Y) if the relevant elements are known zero.""
      
      [X86][SSE] Shuffle combine blends to OR(X,Y) if the relevant elements are known zero (REAPPLIED)
      
      This allows us to remove the (depth violating) code in getFauxShuffleMask where we were combining the OR(SHUFFLE,SHUFFLE) shuffle inputs as well, and not just the OR().
      
      This is a minor step toward being able to shuffle combine from/to SELECT/BLENDV as a faux shuffle.
      
      Reapplied with fixed signed/unsigned comparisons.
      47cea9e8
    • Florian Hahn's avatar
      [AArch64] Consider instruction-level contract FMFs in combiner patterns. · f7658241
      Florian Hahn authored
      Currently, instruction level fast math flags are not considered when
      generating patterns for the machine combiner.
      
      This currently leads to some missed opportunities to generate FMAs in
      combination with `#pragma clang fp contract (fast)`.
      
      For example, when building the example below with -O3 for AArch64, no
      FMADD is generated. If built with -O2 and the DAGCombiner is used
      instead of the MachineCombiner for FMAs, an FMADD is generated.
      
      With this patch, the same code is generated in both cases.
      
          float madd_contract(float a, float b, float c) {
          #pragma clang fp contract (fast)
            return (a * b) + c;
          }
      
      Reviewed By: dmgreen
      
      Differential Revision: https://reviews.llvm.org/D84930
      f7658241
    • Florian Hahn's avatar
      [SCEV] Consolidate some smin/smax folding tests into single test file. · b7856f9d
      Florian Hahn authored
      This patch moves a few spread out smin/smax tests to smin-smax-folds.ll
      and adds additional test cases that expose further potential for
      folds.
      b7856f9d
    • Tatyana Krasnukha's avatar
      Partially revert "[cmake] Make MSVC generate appropriate __cplusplus macro definition" · 4f5ccc72
      Tatyana Krasnukha authored
      The /Zc:__cplusplus option fixes GTEST_LANG_CXX11 value but not GTEST_HAS_TR1_TUPLE,
      so we still need to force the latter off.
      
      Still pass the option since it is required by https://reviews.llvm.org/D78186 too.
      
      Differential Revision: https://reviews.llvm.org/D84023
      4f5ccc72
    • Simon Pilgrim's avatar
      [X86][AVX] Add v8f32 'reverse' HADD(SHUFFLE,SHUFFLE) test coverage · 0acef824
      Simon Pilgrim authored
      Shows missed opportunity for HADD on AVX1 targets with a relatively simple lane crossing post shuffle
      0acef824
    • Georgii Rymar's avatar
      [llvm-readobj] - A second attempt to fix BB. · bb303a17
      Georgii Rymar authored
      The failure is:
      http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/15711/steps/build%20stage%201/logs/stdio
      
      FAILED: /usr/bin/c++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/llvm-readobj -I/home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj -Iinclude -I/home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/include -march=broadwell -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3     -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -MT tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o -MF tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o.d -o tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o -c /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp: In function ‘llvm::Expected<const llvm::object::Elf_Mips_Options<ELFT>*> readMipsOptions(const uint8_t*, llvm::ArrayRef<unsigned char>&, bool&)’:
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3373:12: error: parse error in template argument list
           if (O->size < ExpectedSize)
                  ^
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp: In instantiation of ‘llvm::Expected<const llvm::object::Elf_Mips_Options<ELFT>*> readMipsOptions(const uint8_t*, llvm::ArrayRef<unsigned char>&, bool&) [with ELFT = llvm::object::ELFType<(llvm::support::endianness)0u, true>; uint8_t = unsigned char]’:
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3400:30:   required from ‘void {anonymous}::ELFDumper<ELFT>::printMipsOptions() [with ELFT = llvm::object::ELFType<(llvm::support::endianness)0u, true>]’
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:2878:21:   required from ‘void {anonymous}::ELFDumper<ELFT>::printArchSpecificInfo() [with ELFT = llvm::object::ELFType<(llvm::support::endianness)0u, true>]’
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:6999:1:   required from here
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3373:5: error: ‘size’ is not a member template function
           if (O->size < ExpectedSize)
           ^
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp: In instantiation of ‘llvm::Expected<const llvm::object::Elf_Mips_Options<ELFT>*> readMipsOptions(const uint8_t*, llvm::ArrayRef<unsigned char>&, bool&) [with ELFT = llvm::object::ELFType<(llvm::support::endianness)1u, true>; uint8_t = unsigned char]’:
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3400:30:   required from ‘void {anonymous}::ELFDumper<ELFT>::printMipsOptions() [with ELFT = llvm::object::ELFType<(llvm::support::endianness)1u, true>]’
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:2878:21:   required from ‘void {anonymous}::ELFDumper<ELFT>::printArchSpecificInfo() [with ELFT = llvm::object::ELFType<(llvm::support::endianness)1u, true>]’
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:6999:1:   required from here
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3373:5: error: ‘size’ is not a member template function
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp: In instantiation of ‘llvm::Expected<const llvm::object::Elf_Mips_Options<ELFT>*> readMipsOptions(const uint8_t*, llvm::ArrayRef<unsigned char>&, bool&) [with ELFT = llvm::object::ELFType<(llvm::support::endianness)0u, false>; uint8_t = unsigned char]’:
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3400:30:   required from ‘void {anonymous}::ELFDumper<ELFT>::printMipsOptions() [with ELFT = llvm::object::ELFType<(llvm::support::endianness)0u, false>]’
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:2878:21:   required from ‘void {anonymous}::ELFDumper<ELFT>::printArchSpecificInfo() [with ELFT = llvm::object::ELFType<(llvm::support::endianness)0u, false>]’
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:6999:1:   required from here
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3373:5: error: ‘size’ is not a member template function
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp: In instantiation of ‘llvm::Expected<const llvm::object::Elf_Mips_Options<ELFT>*> readMipsOptions(const uint8_t*, llvm::ArrayRef<unsigned char>&, bool&) [with ELFT = llvm::object::ELFType<(llvm::support::endianness)1u, false>; uint8_t = unsigned char]’:
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3400:30:   required from ‘void {anonymous}::ELFDumper<ELFT>::printMipsOptions() [with ELFT = llvm::object::ELFType<(llvm::support::endianness)1u, false>]’
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:2878:21:   required from ‘void {anonymous}::ELFDumper<ELFT>::printArchSpecificInfo() [with ELFT = llvm::object::ELFType<(llvm::support::endianness)1u, false>]’
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:6999:1:   required from here
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3373:5: error: ‘size’ is not a member template function
      ninja: build stopped: subcommand failed.
      
      Fix: stop using `auto` for `O` variable.
      bb303a17
    • Endre Fülöp's avatar
      [analyzer] Model iterator random incrementation symmetrically · 141cb8a1
      Endre Fülöp authored
      Summary:
      In case a pointer iterator is incremented in a binary plus expression
      (operator+), where the iterator is on the RHS, IteratorModeling should
      now detect, and track the resulting value.
      
      Reviewers: Szelethus, baloghadamsoftware
      
      Reviewed By: baloghadamsoftware
      
      Subscribers: rnkovacs, whisperity, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, steakhal, martong, ASDenysPetrov, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D83190
      141cb8a1
    • Georgii Rymar's avatar
      [llvm-readobj] - An attempt to fix BB. · d9d22105
      Georgii Rymar authored
      http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/15710/steps/build%20stage%201/logs/stdio
      fails with:
      
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp: In function ‘llvm::Expected<const llvm::object::Elf_Mips_Options<ELFT>*> readMipsOptions(const uint8_t*, llvm::ArrayRef<unsigned char>&, bool&)’:
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3373:19: error: the value of ‘ExpectedSize’ is not usable in a constant expression
           if (O->size < ExpectedSize)
                         ^
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3369:10: note: ‘size_t ExpectedSize’ is not const
         size_t ExpectedSize =
                ^
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3373:12: error: parse error in template argument list
           if (O->size < ExpectedSize)
                  ^
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp: In instantiation of ‘llvm::Expected<const llvm::object::Elf_Mips_Options<ELFT>*> readMipsOptions(const uint8_t*, llvm::ArrayRef<unsigned char>&, bool&) [with ELFT = llvm::object::ELFType<(llvm::support::endianness)0u, true>; uint8_t = unsigned char]’:
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3400:30:   required from ‘void {anonymous}::ELFDumper<ELFT>::printMipsOptions() [with ELFT = llvm::object::ELFType<(llvm::support::endianness)0u, true>]’
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:2878:21:   required from ‘void {anonymous}::ELFDumper<ELFT>::printArchSpecificInfo() [with ELFT = llvm::object::ELFType<(llvm::support::endianness)0u, true>]’
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:6999:1:   required from here
      /home/ssglocal/clang-cmake-x86_64-avx2-linux/clang-cmake-x86_64-avx2-linux/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp:3373:5: error: ‘size’ is not a member template function
      
      Fix: add 2 `const` words to variables.
      d9d22105
    • Georgii Rymar's avatar
      [llvm-readobj/readelf] - Refine the implementation of printMipsOptions(). · 94862018
      Georgii Rymar authored
      `printMipsOptions()` and the test related has the following issues currently:
      
      1) It does not check the value of Elf_Mips_Options<ELFT>::size field.
      2) For ODK_REGINFO options it is possible to read past the end of buffer,
         because there is no check against the `sizeof(Elf_Mips_RegInfo<ELFT>)`.
      3) The error about the broken size is just printed to the standard output.
      4) The binary input is used for the test.
      5) There is no testing for multiple options in the .MIPS.options section,
         though the code supports it.
      6) Only llvm-readobj is tested, but not llvm-readelf.
      7) "Unsupported MIPS options tag" message does not reveal the tag ID/name.
      
      This patch fixes all of these points.
      
      Differential revision: https://reviews.llvm.org/D84854
      94862018
    • Xing GUO's avatar
      [DebugInfo][unittest] Use YAML to generate the .debug_loclists section. · 5d597e20
      Xing GUO authored
      DWARFYAML supports generating the .debug_loclists section. We can use it
      to simplify tests.
      
      Reviewed By: jhenderson, grimar
      
      Differential Revision: https://reviews.llvm.org/D85179
      5d597e20
    • Nicolas Vasilache's avatar
      [MLIR] Add an integration test for 2 D vector.transfer_read · 4bfbf74e
      Nicolas Vasilache authored
      Added a "clone" of the 1D vector's test_transfer_read and added a second dimensionality. The test is not as generic as I would like it to be, because more generic versions appear to break the compiler or the runtime at this stage. As bug are fixed, I will be happy to add another more complete test.
      
      Differential Revision: https://reviews.llvm.org/D83096
      4bfbf74e
    • Nathan James's avatar
    • Georgii Rymar's avatar
      [llvm-readobj] - Simplify findSectionByName(). NFCI. · 8f576a75
      Georgii Rymar authored
      It turns out that findSectionByName can return
      const Elf_Shdr * instead of Expected<>, because its
      code never returns an error currently (it reports warnings instead).
      
      Differential revision: https://reviews.llvm.org/D85135
      8f576a75
    • Juneyoung Lee's avatar
    • Qiu Chaofan's avatar
      [NFC] [PowerPC] Refactor fp/int conversion lowering · 6a78a8dd
      Qiu Chaofan authored
      For FP_TO_INT and INT_TO_FP lowering, we have direct-move and
      non-direct-move methods. But they share some conversion logic, so we can
      reduce redundant code by introducing new methods.
      
      Reviewed By: steven.zhang
      
      Differential Revision: https://reviews.llvm.org/D81818
      6a78a8dd
    • Juneyoung Lee's avatar
      [JumpThreading] Don't limit the type of an operand · 6f97103b
      Juneyoung Lee authored
      Compared to the optimized code with branch conditions never frozen,
      limiting the type of freeze's operand causes generation of suboptimal code in
      some cases.
      I would like to suggest removing the constraint, as this patch does.
      If the number of freeze instructions becomes significant, this can be revisited.
      
      Differential Revision: https://reviews.llvm.org/D84949
      6f97103b
    • Jakub Lichman's avatar
      [mlir][Linalg] Conv ops lowering to std calls added. · 68909696
      Jakub Lichman authored
      Lowering of newly defined Conv ops in TC syntax to standard
      dialect is not supported and therefore this commit adds support
      for it.
      
      Differential Revision: https://reviews.llvm.org/D84840
      68909696
    • Nathan Ridge's avatar
    • Xing GUO's avatar
      [YAMLParser] Fix a typo: iff -> if. NFC. · 25abd199
      Xing GUO authored
      25abd199
    • Fangrui Song's avatar
      [PGO] Use multiple comdat groups for COFF · b959906c
      Fangrui Song authored
      D84723 caused multiple definition issues (related to comdat) on Windows:
      http://lab.llvm.org:8011/builders/sanitizer-windows/builds/67465
      b959906c
    • Wang, Pengfei's avatar
      [X86][AVX512] Fix build fail after D81548 · 6bc7ea2d
      Wang, Pengfei authored
      Test function mask_cmp_128 failed during ISEL
      LLVM ERROR: Cannot select: t37: v8i1 = X86ISD::KSHIFTL t48, TargetConstant:i8<4>
      due to v8i1 only available under AVX512DQ.
      
      Reviewed By: RKSimon
      
      Differential Revision: https://reviews.llvm.org/D84922
      6bc7ea2d
    • Chen Zheng's avatar
      [PowerPC] mark r+i as legal address mode for vector type after pwr9 · 45c46d18
      Chen Zheng authored
      Reviewed By: steven.zhang
      
      Differential Revision: https://reviews.llvm.org/D84735
      45c46d18
    • Carl Ritson's avatar
      [AMDGPU] Make GCNRegBankReassign assign based on subreg banks · 57899934
      Carl Ritson authored
      When scavenging consider the sub-register of the source operand
      to determine the bank of a candidate register (not just sub0).
      Without this it is possible to introduce an infinite loop,
      e.g. $sgpr15_sgpr16_sgpr17 can be assigned for a conflict between
      $sgpr0 and SGPR_96:sub1.
      
      Reviewed By: rampitec
      
      Differential Revision: https://reviews.llvm.org/D84910
      57899934
    • Fangrui Song's avatar
      Add test utility 'split-file' · bcea3a7a
      Fangrui Song authored
      See https://lists.llvm.org/pipermail/llvm-dev/2020-July/143373.html
      "[llvm-dev] Multiple documents in one test file" for some discussions.
      
      This patch has explored several alternatives. The current semantics are similar to
      what @dblaikie proposed.
      `split-file filename output` splits the input file into multiple parts separated by
      regex `^(.|//)--- filename` and write each part to the file `output/filename`
      (`filename` can include path separators).
      
      Use case A (organizing input of different formats (e.g. linker
      script+assembly) in one file).
      
      ```
      # RUN: split-file %s %t
      # RUN: llvm-mc %t/asm -o %t.o
      # RUN: ld.lld -T %t/lds %t.o -o %t
      This is sometimes better than the %S/Inputs/ approach because the user
      can see the auxiliary files immediately and don't have to open another file.
      
      # asm
      ...
      # lds
      ...
      ```
      
      Use case B (for utilities which don't have built-in input splitting
      feature):
      
      ```
      // RUN: split-file %s %t
      // RUN: llc < %t/1.ll | FileCheck %s --check-prefix=CASE1
      // RUN: l...
      bcea3a7a
    • Fangrui Song's avatar
      [PGO] Move __profc_ and __profvp_ from their own comdat groups to __profd_'s comdat group · e56626e4
      Fangrui Song authored
      D68041 placed `__profc_`,  `__profd_` and (if exists) `__profvp_` in different comdat groups.
      There are some issues:
      
      * Cost: one or two additional section headers (`.group` section(s)): 64 or 128 bytes on ELF64.
      * `__profc_`,  `__profd_` and (if exists) `__profvp_` should be retained or
        discarded. Placing them into separate comdat groups is conceptually inferior.
      * If the prevailing group does not include `__profvp_` (value profiling not
        used) but a non-prevailing group from another translation unit has `__profvp_`
        (the function is inlined into another and triggers value profiling), there
        will be a stray `__profvp_` if --gc-sections is not enabled.
        This has been fixed by 3d6f5301.
      
      Actually, we can reuse an existing symbol (we choose `__profd_`) as the group
      signature to avoid a string in the string table (the sole reason that D68041
      could improve code size is that `__profv_` was an otherwise unused symbol which
      wasted string table space). This saves one or two section headers.
      
      For a -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_INSTRUMENTED=IR build, `ninja
      clang lld`, the patch has saved 10.5MiB (2.2%) for the total .o size.
      
      Reviewed By: davidxl
      
      Differential Revision: https://reviews.llvm.org/D84723
      e56626e4
    • Max Kazantsev's avatar
      [SimpleLoopUnswitch][NFC] Add option to always drop make.implicit metadata in... · 7647c271
      Max Kazantsev authored
      [SimpleLoopUnswitch][NFC] Add option to always drop make.implicit metadata in non-trivial unswitching and save compile time
      
      We might want this if we find out that using of MustExecute analysis is too expensive.
      By default we do the analysis because its complexity does not exceed the complexity
      of whole loop copying in unswitching. Follow-up for D84925.
      
      Differential Revision: https://reviews.llvm.org/D85001
      Reviewed By: asbirlea
      7647c271
    • Jonas Devlieghere's avatar
      [lldb/Test] Fix skipTestIfFn for fucntions that return a value · d6a5cce0
      Jonas Devlieghere authored
      Sometimes the decorator is used on a common function rather than the
      test method, which can return a value. This fails with decorators that
      use skipTestIfFn under the hood.
      d6a5cce0
    • Jordan Rupprecht's avatar
      Temporarily revert "[test] Exit with an error if no tests are run." · a06c28df
      Jordan Rupprecht authored
      This reverts commit adb5c23f. It surprisingly fails on a windows build bot: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/18009
      
      Will reland after some investigation and/or after adding some extra logging to help debug the issue.
      a06c28df
    • Chen Zheng's avatar
      [SCEVExpander][PowerPC]clear scev rewriter before deleting instructions. · ba955397
      Chen Zheng authored
      Reviewed By: lebedev.ri
      Differential Revision: https://reviews.llvm.org/D85130
      ba955397
    • peter klausler's avatar
      675ad1bc
    • Shinji Okumura's avatar
      [Attributor][NFC] Clang format · ffe0066b
      Shinji Okumura authored
      ffe0066b
    • David Blaikie's avatar
      OpenMP: Fix typo variabls -> variables · 0c938a8d
      David Blaikie authored
      0c938a8d
    • Petr Hosek's avatar
      [ELF] Add --dependency-file option · 81eeabbd
      Petr Hosek authored
      Clang and GCC have a feature (-MD flag) to create a dependency file
      in a format that build systems such as Make or Ninja can read, which
      specifies all the additional inputs such .h files.
      
      This change introduces the same functionality to lld bringing it to
      feature parity with ld and gold which gained this feature recently.
      See https://sourceware.org/bugzilla/show_bug.cgi?id=22843 for more
      details and discussion.
      
      The implementation corresponds to -MD -MP compiler flag where the
      generated dependency file also includes phony targets which works
      around the errors where the dependency is removed. This matches the
      format used by ld and gold.
      
      Fixes PR42806
      
      Differential Revision: https://reviews.llvm.org/D82437
      81eeabbd
    • Daniel Sanders's avatar
    • peter klausler's avatar
      [flang] Defer "next input record" processing until handlers established · d879ac8a
      peter klausler authored
      External input was detecting "end of file" conditions in
      BeginExternal...Input() and BeginUnformattedInput() routines
      before EnableHandlers() could have been called.  Defer the
      "start next record" processing to the input data item
      handlers (and EndIoStatement() for when there are no data
      items).
      
      Differential Revision: https://reviews.llvm.org/D85161
      d879ac8a