1. Jan 10, 2020
    • Benjamin Kramer's avatar
    • Diogo Sampaio's avatar
      Reverting, broke some bots. Need further investigation. · b1bb5ce9
      Diogo Sampaio authored
      Summary: This reverts commit 8c12769f.
      
      Reviewers:
      
      Subscribers:
      b1bb5ce9
    • Tatyana Krasnukha's avatar
      [lldb][tests] Cleanup '.categories' · b3af8ab7
      Tatyana Krasnukha authored
      b3af8ab7
    • Ulrich Weigand's avatar
      [FPEnv] Generate constrained FP comparisons from clang · 76e9c2a9
      Ulrich Weigand authored
      Update the IRBuilder to generate constrained FP comparisons in
      CreateFCmp when IsFPConstrained is true, similar to the other
      places in the IRBuilder.
      
      Also, add a new CreateFCmpS to emit signaling FP comparisons,
      and use it in clang where comparisons are supposed to be signaling
      (currently, only when emitting code for the <, <=, >, >= operators).
      
      Note that there is currently no way to add fast-math flags to a
      constrained FP comparison, since this is implemented as an intrinsic
      call that returns a boolean type, and FMF are only allowed for calls
      returning a floating-point type. However, given the discussion around
      https://bugs.llvm.org/show_bug.cgi?id=42179, it seems that FCmp itself
      really shouldn't have any FMF either, so this is probably OK.
      
      Reviewed by: craig.topper
      
      Differential Revision: https://reviews.llvm.org/D71467
      76e9c2a9
    • Tatyana Krasnukha's avatar
      9ba15127
    • Tatyana Krasnukha's avatar
      [lldb][tests] Take into account all parent's categories when traverse folders upwards · e4d67297
      Tatyana Krasnukha authored
      This is needed to not re-write parent's categories by categories of a nested folder,
      e.g. commands/expression/completion specify "cmdline" category, however it still belongs
      to parent's "expression" category.
      
      The sentinel ".categories" in the test-suite root directory is no longer needed.
      
      Differential Revision: https://reviews.llvm.org/D71905
      e4d67297
    • Andrew Ng's avatar
      [Support] ThreadPoolExecutor fixes for Windows/MinGW · 564481ae
      Andrew Ng authored
      Changed ThreadPoolExecutor to no longer use detached threads and instead
      to join threads on destruction. This is to prevent intermittent crashing
      on Windows when doing a normal full exit, e.g. via exit().
      
      Changed ThreadPoolExecutor to be a ManagedStatic so that it can be
      stopped on llvm_shutdown(). Without this, it would only be stopped in
      the destructor when doing a full exit. This is required to avoid
      intermittent crashing on Windows due to a race condition between the
      ThreadPoolExecutor starting up threads and the process doing a fast
      exit, e.g. via _exit().
      
      The Windows crashes appear to only occur with the MSVC static runtimes
      and are more frequent with the debug static runtime.
      
      These changes also prevent intermittent deadlocks on exit with the MinGW
      runtime.
      
      Differential Revision: https://reviews.llvm.org/D70447
      564481ae
    • Pavel Labath's avatar
      [lldb] Surpress "bitfield too small" gcc warning · c88e298b
      Pavel Labath authored
      Gcc produces this (technically correct) warning when storing an
      explicitly-sized enum in a bitfield. Surpress that by changing the type
      of the bitfield to an integer. The same approach is used elsewhere in
      llvm (e.g. 56b5eab1).
      c88e298b
    • Ilya Biryukov's avatar
      [CodeComplete] Suggest 'return nullptr' in functions returning pointers · 57a51b68
      Ilya Biryukov authored
      Reviewers: kadircet
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D72497
      57a51b68
    • Pavel Labath's avatar
      [lldb/DWARF] Don't automatically search dwo unit attributes · e65282de
      Pavel Labath authored
      This patch removes the code (deep inside DWARFDebugInfoEntry) which
      automagically returned the attributes of the dwo unit DIE when asking
      for the attributes of the skeleton unit.  This is fairly hacky, and not
      consistent with how llvm DWARF parser operates.
      
      Instead, I change the code the explicitly request (via
      GetNonSkeletonUnit) the right unit to search (there were just two places
      that needed this). If it turns out we need this more often, we can
      create a utility function (external to DWARFUnit) for doing this.
      e65282de
    • Pavel Labath's avatar
    • Diogo Sampaio's avatar
      [ARM][Thumb2] Fix ADD/SUB invalid writes to SP · 8c12769f
      Diogo Sampaio authored
      Summary:
      This patch fixes pr23772  [ARM] r226200 can emit illegal thumb2 instruction: "sub sp, r12, #80".
      The violation was that SUB and ADD (reg, immediate) instructions can only write to SP if the source register is also SP. So the above instructions was unpredictable.
      To enforce that the instruction t2(ADD|SUB)ri does not write to SP we now enforce the destination register to be rGPR (That exclude PC and SP).
      Different than the ARM specification, that defines one instruction that can read from SP, and one that can't, here we inserted one that can't write to SP, and other that can only write to SP as to reuse most of the hard-coded size optimizations.
      When performing this change, it uncovered that emitting Thumb2 Reg plus Immediate could not emit all variants of ADD SP, SP #imm instructions before so it was refactored to be able to. (see test/CodeGen/Thumb2/mve-stacksplot.mir where we use a subw sp, sp, Imm12 variant )
      It also uncovered a disassembly issue of adr.w instructions, that were only written as SUBW instructions (see llvm/test/MC/Disassembler/ARM/thumb2.txt).
      
      Reviewers: eli.friedman, dmgreen, carwil, olista01, efriedma
      
      Reviewed By: efriedma
      
      Subscribers: john.brawn, efriedma, ostannard, kristof.beyls, hiraditya, dmgreen, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D70680
      8c12769f
    • Simon Tatham's avatar
      [ARM,MVE] Make `vqrshrun` generate the right instruction. · 1ccee0e8
      Simon Tatham authored
      Summary:
      A copy-paste error in `arm_mve.td` meant that the MVE `vqrshrun`
      intrinsic family was generating the `vqshrun` machine instruction,
      because in the IR intrinsic call, the rounding flag argument was set
      to 0 rather than 1.
      
      Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard
      
      Reviewed By: dmgreen
      
      Subscribers: kristof.beyls, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D72496
      1ccee0e8
    • Simon Pilgrim's avatar
      Fix "pointer is null" static analyzer warnings. NFCI. · 870f6917
      Simon Pilgrim authored
      Assert that the pointers are non-null before dereferencing them.
      870f6917
    • Jaroslav Sevcik's avatar
      Data formatters: Look through array element typedefs · 90297427
      Jaroslav Sevcik authored
      Summary:
      Motivation: When formatting an array of typedefed chars, we would like to display the array as a string.
      
      The string formatter currently does not trigger because the formatter lookup does not resolve typedefs for array elements (this behavior is inconsistent with pointers, for those we do look through pointee typedefs). This patch tries to make the array formatter lookup somewhat consistent with the pointer formatter lookup.
      
      Reviewers: teemperor, clayborg
      
      Reviewed By: teemperor, clayborg
      
      Subscribers: clayborg, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D72133
      90297427
    • Simon Pilgrim's avatar
      Fix Wdocumentation warning. NFCI. · f3849f73
      Simon Pilgrim authored
      f3849f73
    • Simon Pilgrim's avatar
      Fix Wdocumentation warning. NFCI. · b2cd2734
      Simon Pilgrim authored
      b2cd2734
    • Simon Pilgrim's avatar
      [X86][AVX] Add tests for v8f32/v8i32 089abcde and 0189abcd shuffles · 3804ac63
      Simon Pilgrim authored
      Mentioned in D66004
      3804ac63
    • Simon Pilgrim's avatar
      Don't use dyn_cast_or_null if we know the pointer is nonnull. · 2e66405d
      Simon Pilgrim authored
      Fix clang static analyzer null dereference warning by using dyn_cast instead.
      2e66405d
    • Benjamin Kramer's avatar
    • Peng Guo's avatar
      [MIR] Fix cyclic dependency of MIR formatter · cfd84984
      Peng Guo authored
      Summary:
      Move MIR formatter pointer from TargetMachine to TargetInstrInfo to
      avoid cyclic dependency between target & codegen.
      
      Reviewers: dsanders, bkramer, arsenm
      
      Subscribers: wdng, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D72485
      cfd84984
    • Serge Guelton's avatar
      XFAIL load_extension.ll test on macOS only · a1cc19b5
      Serge Guelton authored
      Other setup have been fixed by 346de9b6
      a1cc19b5
    • Sergej Jaskiewicz's avatar
      [CMake] Support running libc++abi tests in CrossWinToARMLinux cache file · e44dedd3
      Sergej Jaskiewicz authored
      Summary:
      Now that D71894 has landed, we're able to run libc++abi tests remotely.
      
      For that we can use the same CMake command as before. The tests can be run using `ninja check-cxxabi`.
      
      Reviewers: andreil99, vvereschaka, aorlov
      
      Reviewed By: vvereschaka, aorlov
      
      Subscribers: mgorny, kristof.beyls, ldionne, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D72459
      e44dedd3
    • Sergej Jaskiewicz's avatar
      [libcxx] Force-cache LIBCXX_CXX_ABI_LIBRARY_PATH · 41f4dfd6
      Sergej Jaskiewicz authored
      Summary:
      The `LIBCXX_CXX_ABI_LIBRARY_PATH` CMake variable is cached once in
      libcxx/cmake/Modules/HandleLibCXXABI.cmake in the `setup_abi_lib` macro,
      and then cached again in libcxx/test/CMakeLists.txt. There, if it is
      not set to a value, it is by default set to `LIBCXX_LIBRARY_DIR`.
      
      However, this new value is not actually cached, because the old (empty)
      value has been already cached. Use the `FORCE` CMake flag so that it
      is saved to the cache.
      
      This should not break anything, because the code changed here previously
      had no effect, when it should have.
      
      Reviewers: jroelofs, bcraig, ldionne, EricWF, mclow.lists, vvereschaka, eastig
      
      Reviewed By: vvereschaka
      
      Subscribers: mgorny, christof, dexonsmith, libcxx-commits
      
      Tags: #libc
      
      Differential Revision: https://reviews.llvm.org/D69169
      41f4dfd6
    • Sjoerd Meijer's avatar
    • Sjoerd Meijer's avatar
      [SVEV] Recognise hardware-loop intrinsic loop.decrement.reg · 67bf9a61
      Sjoerd Meijer authored
      Teach SCEV about the @loop.decrement.reg intrinsic, which has exactly the same
      semantics as a sub expression. This allows us to query hardware-loops, which
      contain this @loop.decrement.reg intrinsic, so that we can calculate iteration
      counts, exit values, etc. of hardwareloops.
      
      This "int_loop_decrement_reg" intrinsic is defined as "IntrNoDuplicate". Thus,
      while hardware-loops and tripcounts now become analysable by SCEV, this
      prevents the usual loop transformations from applying transformations on
      hardware-loops, which is what we want at this point, for which I have added
      test cases for loopunrolling and IndVarSimplify and LFTR.
      
      Differential Revision: https://reviews.llvm.org/D71563
      67bf9a61
    • serge-sans-paille's avatar
      Fix several issues with compiler extensions · 346de9b6
      serge-sans-paille authored
      - Update documentation now that the move to monorepo has been made
      - Do not tie compiler extension testing to LLVM_BUILD_EXAMPLES
      - No need to specify LLVM libraries for plugins
      - Add NO_MODULE option to match Polly specific requirements (i.e. building the
        module *and* linking it statically)
      - Issue a warning when building the compiler extension with
        LLVM_BYE_LINK_INTO_TOOLS=ON, as it modifies the behavior of clang, which only
        makes sense for testing purpose.
      
      Still mark llvm/test/Feature/load_extension.ll as XFAIL because of a
      ManagedStatic dependency that's going to be fixed in a seperate commit.
      
      Differential Revision: https://reviews.llvm.org/D72327
      346de9b6
    • Kadir Cetinkaya's avatar
      [clangd] Fix markdown rendering in VSCode · abfa27e4
      Kadir Cetinkaya authored
      Summary:
      Eventough it is OK to have a new line without any preceding spaces in
      some markdown specifications, VSCode requires two spaces before a new line to
      break a line inside a paragraph.
      
      Reviewers: sammccall, ilya-biryukov
      
      Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D72462
      abfa27e4
    • Kadir Cetinkaya's avatar
      [clangd] Improve type printing in hover · ffd0f116
      Kadir Cetinkaya authored
      Summary:
      Do not include tag keywords when printing types for symbol names, as it
      will come from SymbolKind.
      Also suppress them while printing definitions to prevent them occuring in
      template arguments.
      Make use of `getAsString`, instead of `print` in all places to have a consistent
      style across the file.
      
      Reviewers: sammccall
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D72450
      ffd0f116
    • Qiu Chaofan's avatar
      [NFC] [PowerPC] Add isPredicable for basic instrs · 45c4b08d
      Qiu Chaofan authored
      PowerPC uses a dedicated method to check if the machine instr is
      predicable by opcode. However, there's a bit `isPredicable` in instr
      definition. This patch removes the method and set the bit only to
      opcodes referenced in it.
      
      Differential Revision: https://reviews.llvm.org/D71921
      45c4b08d
    • serge-sans-paille's avatar
      Allow system header to provide their own implementation of some builtin · 921f871a
      serge-sans-paille authored
      If a system header provides an (inline) implementation of some of their
      function, clang still matches on the function name and generate the appropriate
      llvm builtin, e.g. memcpy. This behavior is in line with glibc recommendation «
      users may not provide their own version of symbols » but doesn't account for the
      fact that glibc itself can provide inline version of some functions.
      
      It is the case for the memcpy function when -D_FORTIFY_SOURCE=1 is on. In that
      case an inline version of memcpy calls __memcpy_chk, a function that performs
      extra runtime checks. Clang currently ignores the inline version and thus
      provides no runtime check.
      
      This code fixes the issue by detecting functions whose name is a builtin name
      but also have an inline implementation.
      
      Differential Revision: https://reviews.llvm.org/D71082
      921f871a
    • Hans Wennborg's avatar
      Restore order in clang-tidy section of release notes · 164da673
      Hans Wennborg authored
      Major changes are introduction of subsubsections to prevent people
      putting new entries in wrong places. I also polished line length and
      highlighting.
      
      Patch by Eugene Zelenko!
      164da673
    • Gil Rapaport's avatar
      [LV] VPValues for memory operation pointers (NFCI) · 8647a72c
      Gil Rapaport authored
      Memory instruction widening recipes use the pointer operand of their load/store
      ingredient for generating the needed GEPs, making it difficult to feed these
      recipes with pointers based on other ingredients or none at all.
      This patch modifies these recipes to use a VPValue for the pointer instead, in
      order to reduce ingredient def-use usage by ILV as a step towards full
      VPlan-based def-use relations. The recipes are constructed with VPValues bound
      to these ingredients, maintaining current behavior.
      
      Differential revision: https://reviews.llvm.org/D70865
      8647a72c
    • Ilya Biryukov's avatar
      759c9045
    • Sylvestre Ledru's avatar
      clang-tidy doc - remove the widths · b38d0d5b
      Sylvestre Ledru authored
      b38d0d5b
    • Shoaib Meenai's avatar
      [xray] Remove cl::sub from alias options · 995c18fc
      Shoaib Meenai authored
      Currently running the xray tools generates a number of errors:
      
      $ ./bin/llvm-xray
      : for the   -k option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
      : for the   -d option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
      : for the   -o option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
      : for the   -f option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
      : for the   -s option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
      : for the   -r option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
      : for the   -p option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
      : for the   -m option: cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!
      <snip>
      
      Patch by Ryan Mansfield.
      
      Differential Revision: https://reviews.llvm.org/D69386
      995c18fc
    • Wei Mi's avatar
      [ThinLTO] Pass CodeGenOpts like UnrollLoops/VectorizeLoop/VectorizeSLP · 21a4710c
      Wei Mi authored
      down to pass builder in ltobackend.
      
      Currently CodeGenOpts like UnrollLoops/VectorizeLoop/VectorizeSLP in clang
      are not passed down to pass builder in ltobackend when new pass manager is
      used. This is inconsistent with the behavior when new pass manager is used
      and thinlto is not used. Such inconsistency causes slp vectorization pass
      not being enabled in ltobackend for O3 + thinlto right now. This patch
      fixes that.
      
      Differential Revision: https://reviews.llvm.org/D72386
      21a4710c
    • Nico Weber's avatar
      fix another typo to cycle bots · 01662aeb
      Nico Weber authored
      01662aeb
    • Nico Weber's avatar
      fix a few typos to cycle the bots · efabe427
      Nico Weber authored
      efabe427
    • Shengchen Kan's avatar
      [NFC] Style cleanup · 02c59833
      Shengchen Kan authored
      02c59833