1. Nov 13, 2019
    • Craig Topper's avatar
      [X86] Don't consider v64i1 as a legal type unless v64i8 is also a legal type. · 3e1aee2b
      Craig Topper authored
      This avoids some nasty issues with argument passing and lowering of
      arbitrary v64i8 shuffles.
      3e1aee2b
    • Craig Topper's avatar
      [X86] Only pass v64i8/v32i16 as v16i32 on non-avx512bw targets if the v16i32... · 0f04ffc0
      Craig Topper authored
      [X86] Only pass v64i8/v32i16 as v16i32 on non-avx512bw targets if the v16i32 type won't be split by prefer-vector-width=256
      
      Otherwise just let the v64i8/v32i16 types be split to v32i8/v16i16.
      
      In reality this shouldn't happen because it means we have a 512-bit
      vector argument, but min-legal-vector-width says a value less than
      512. But a 512-bit argument should have been factored into the
      preferred vector width.
      0f04ffc0
    • Sterling Augustine's avatar
      Fix include guard and properly order __deregister_frame_info. · 38c35617
      Sterling Augustine authored
      Summary:
      This patch fixes two problems with the crtbegin.c as written:
      
      1. In do_init, register_frame_info is not guarded by a #define, but in
      do_fini, deregister_frame_info is guarded by #ifndef
      CRT_HAS_INITFINI_ARRAY. Thus when CRT_HAS_INITFINI_ARRAY is not
      defined, frames are registered but then never deregistered.
      
      The frame registry mechanism builds a linked-list from the .so's
      static variable do_init.object, and when the .so is unloaded, this
      memory becomes invalid and should be deregistered.
      
      Further, libgcc's crtbegin treats the frame registry as independent
      from the initfini array mechanism.
      
      This patch fixes this by adding a new #define,
      "EH_USE_FRAME_INFO_REGISTRY", which is set by the cmake option
      COMPILER_RT_CRT_USE_EH_FRAME_REGISTRY Currently, do_init calls
      register_frame_info, and then calls the binary's constructors. This
      allows constructors to safely use libunwind. However, do_fini calls
      deregister_frame_info and then calls the binary's destructors. This
      prevents destructors from safely using libunwind.
      
      This patch also switches that ordering, so that destructors can safely
      use libunwind. As it happens, this is a fairly common scenario for
      thread sanitizer.
      38c35617
    • Weverything's avatar
      Add -Wtautological-compare to -Wall · 9740f9f0
      Weverything authored
      Some warnings in -Wtautological-compare subgroups are DefaultIgnore.
      Adding this group to -Wmost, which is part of -Wall, will aid in their
      discoverability.
      
      Differential Revision: https://reviews.llvm.org/D69292
      9740f9f0
    • Yonghong Song's avatar
      [BPF] generate BTF_KIND_VARs for all non-static globals · 166cdc02
      Yonghong Song authored
      Enable to generate BTF_KIND_VARs for non-static
      default-section globals which is not allowed previously.
      Modified the existing test case to accommodate the new change.
      
      Also removed unused linkage enum members VAR_GLOBAL_TENTATIVE and
      VAR_GLOBAL_EXTERNAL.
      
      Differential Revision: https://reviews.llvm.org/D70145
      166cdc02
    • Alina Sbirlea's avatar
      [GlobalsAA] Restrict ModRef result if any internal method has its address taken. · db69f1b2
      Alina Sbirlea authored
      Summary:
      If there are any internal methods whose address was taken, conclude there is nothing known in relation of any other internal method and a global.
      
      Reviewers: nlopes, sanjoy.google
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69690
      db69f1b2
    • Jonas Devlieghere's avatar
      [LLDB] Fix/silence CMake developer warning for LLDB framework. · a247bd1f
      Jonas Devlieghere authored
      This fixes the following warning for developers:
      
        Target 'liblldb' was changed to a FRAMEWORK sometime after install().  This
        may result in the wrong install DESTINATION.  Set the FRAMEWORK property
        earlier.
      
      The solution is to pass the FRAMEWORK flag to add_lldb_library and set
      the target property before install(). For now liblldb is the only
      customer.
      a247bd1f
    • Alina Sbirlea's avatar
      [GVNHoist] Preserve AAResults. · 4ae74cc9
      Alina Sbirlea authored
      Resolves PR38906, PR40898.
      4ae74cc9
    • mydeveloperday's avatar
      Allow additional file suffixes/extensions considered as source in main include grouping · 335ac2eb
      mydeveloperday authored
      Summary:
      By additional regex match, grouping of main include can be enabled in files that are not normally considered as a C/C++ source code.
      For example, this might be useful in templated code, where template implementations are being held in *Impl.hpp files.
      On the occassion, 'assume-filename' option description was reworded as it was misleading. It has nothing to do with `style=file` option and it does not influence sourced style filename.
      
      Reviewers: rsmith, ioeric, krasimir, sylvestre.ledru, MyDeveloperDay
      
      Reviewed By: MyDeveloperDay
      
      Subscribers: MyDeveloperDay, cfe-commits
      
      Patch by:  furdyna
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D67750
      335ac2eb
    • Jonas Devlieghere's avatar
      [LLDB] Always remove debugserver from LLVM_DISTRIBUTION_COMPONENTS · fbb228c7
      Jonas Devlieghere authored
      Centralize the logic to remove debugserver from
      LLVM_DISTRIBUTION_COMPONENTS when LLDB_USE_SYSTEM_DEBUGSERVER is
      enabled. Now this happens regardless of whether the tests are enabled.
      fbb228c7
    • Evandro Menezes's avatar
      [AArch64] Update for Exynos · 9b1e86f0
      Evandro Menezes authored
      Fix the modeling for loads and stores using the register offset addresing mode.
      9b1e86f0
    • Evandro Menezes's avatar
      [AArch64] Fix addressing mode predicates · 98856e39
      Evandro Menezes authored
      Fix predicates related to the register offset addressing mode.
      98856e39
    • Michael Kruse's avatar
      [CodeGen] Fix getArrayAccessFor crashes as in bug 32534 with -polly-vectorizer=polly. · 0aff3174
      Michael Kruse authored
      Root cause is VectorBlockGenerator::copyStmt iterates all instructions
      in basic block, however some load instructions may be not unnecessary
      thus removed by simplification. As a result, these load instructions
      don't have a corresponding array.
      
      Looking at BlockGenerator::copyBB, it only iterates instructions list
      of ScopStmt. Given it must be a block type scop in case of
      vectorization, I think we should do the same in
      VectorBlockGenerator::copyStmt.
      
      Patch by bin.narwal <bin.narwal@gmail.com>
      
      Differential Revision: https://reviews.llvm.org/D70076
      0aff3174
    • Mark de Wever's avatar
      [Analyzer] Use a reference in a range-based for · 96484286
      Mark de Wever authored
      Let the checkers use a reference instead of a copy in a range-based
      for loop.
      
      This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
      
      Differential Revision: https://reviews.llvm.org/D70047
      96484286
    • Mark de Wever's avatar
      [OpenMP] Use an explicit copy in a range-based for · 51abcebb
      Mark de Wever authored
      The std::pair<const clang::ValueDecl *, llvm::ArrayRef<clang::OMPClauseMappableExprCommon::MappableComponent>>
      type will be copied in a range-based for loop. Make the copy explicit to
      avoid the -Wrange-loop-analysis warning.
      
      This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
      
      Differential Revision: https://reviews.llvm.org/D70046
      51abcebb
    • Mark de Wever's avatar
      [AST] Use an explicit copy in a range-based for · 2149028c
      Mark de Wever authored
      The AssociationIteratorTy type will be copied in a range-based for loop.
      Make the copy explicit to avoid the -Wrange-loop-analysis warning.
      
      This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
      
      Differential Revision: https://reviews.llvm.org/D70045
      2149028c
    • shafik's avatar
      [LLDB][Formatters] Re-enable std::function formatter with fixes to improve... · 91e94a70
      shafik authored
      [LLDB][Formatters] Re-enable std::function formatter with fixes to improve non-cached lookup performance
      
      Performance issues lead to the libc++ std::function formatter to be disabled. We addressed some of those performance issues by adding caching see D67111
      This PR fixes the first lookup performance by not using FindSymbolsMatchingRegExAndType(...) and instead finding the compilation unit the std::function wrapped callable should be in and then searching for the callable directly in the CU.
      
      Differential Revision: https://reviews.llvm.org/D69913
      91e94a70
    • Fangrui Song's avatar
      [llvm-objcopy][COFF] Implement --redefine-sym and --redefine-syms · 7af6025b
      Fangrui Song authored
      The parsing error tests in ELF/redefine-symbols.test are not specific to ELF.
      Move them to redefine-symbols.test.
      Add COFF/redefine-symbols.test for COFF specific tests.
      
      Also fix the documentation regarding --redefine-syms: the old and new
      names are separated by whitespace, not an equals sign.
      
      Reviewed By: mstorsjo
      
      Differential Revision: https://reviews.llvm.org/D70036
      7af6025b
    • Davide Italiano's avatar
      [ObjectFileMachO] Fix the build for __arm64__. · 96915495
      Davide Italiano authored
      Catch up with an API change.
      96915495
    • Peter Collingbourne's avatar
      ARM: Don't emit R_ARM_NONE relocations to compact unwinding decoders in .ARM.exidx on Android. · 1549b469
      Peter Collingbourne authored
      These relocations are specified by the ARM EHABI (section 6.3). As I understand
      it, their purpose is to accommodate unwinder implementations that wish to
      reduce code size by placing the implementations of the compact unwinding
      decoders in a separate translation unit, and using extern weak symbols to
      refer to them from the main unwinder implementation, so that they are only
      linked when something in the binary needs them in order to unwind.
      
      However, neither of the unwinders used on Android (libgcc, LLVM libunwind)
      use this technique, and in fact emitting these relocations ends up being
      counterproductive to code size because they cause a copy of the unwinder
      to be statically linked into most binaries, regardless of whether it is
      actually needed. Furthermore, these relocations create circular dependencies
      (between libc and the unwinder) in cases where the unwinder is dynamically
      linked and libc contains compact unwind info.
      
      Therefore, deviate from the EHABI here and stop emitting these relocations
      on Android.
      
      Differential Revision: https://reviews.llvm.org/D70027
      1549b469
    • Michael Liao's avatar
      Fix build with shared libraries. NFC. · ceb72d07
      Michael Liao authored
      - Dependent components need linking directly.
      ceb72d07
    • Alexey Bataev's avatar
      [OPENMP]Use copy constructors instead of assignment operators in declare · 3c676e38
      Alexey Bataev authored
      reduction initializers.
      
      Better to use copy constructor at the initialization of the declare
      reduction construct rather than assignment operator.
      3c676e38
    • Sam Clegg's avatar
      [libcxxabi] Prevent cmake from removing our explicit system C++ include paths · 4230fa93
      Sam Clegg authored
      We build with `-nostdinc++` and add our own header path via
      `LIBCXXABI_LIBCXX_INCLUDES`.  However cmake tried to be clever and if
      `LIBCXXABI_LIBCXX_INCLUDES` happens to match the compilers system path
      it will remove the `-I` flag meaning we can't access any C++ headers.
      
      Ideally cmake would be able see that we are using `-nostdinc++` and
      disable this behaviour.
      
      Differential Revision: https://reviews.llvm.org/D69973
      4230fa93
    • Krzysztof Parzyszek's avatar
    • Adrian Prantl's avatar
      Performance: Add a set of visited SymbolFiles to the other FindFiles variant. · 3b73dcdc
      Adrian Prantl authored
      This is basically the same bug as in r260434.
      
      SymbolFileDWARF::FindTypes has exponential worst-case when digging
      through dependency DAG of .pcm files because each object file and .pcm
      file may depend on an already-visited .pcm file, which may again have
      dependencies. Fixed here by carrying a set of already visited
      SymbolFiles around.
      
      rdar://problem/56993424
      
      Differential Revision: https://reviews.llvm.org/D70106
      3b73dcdc
    • Julian Lettner's avatar
      [lit] Better/earlier errors for empty runs · 54a9b4c0
      Julian Lettner authored
      Fail early, when we discover no tests at all, or filter out all of them.
      
      There is also `--allow-empty-runs` to disable test to allow workflows
      like `LIT_FILTER=abc ninja check-all`.  Apparently `check-all` invokes
      lit multiple times if certain projects are enabled, which would produce
      unwanted "empty runs". Specify via `LIT_OPTS=--allow-empty-runs`.
      
      There are 3 causes for empty runs:
      1) No tests discovered.  This is always an error.  Fix test suite config
         or command line.
      2) All tests filtered out.  This is an error by default, but can be
         suppressed via `--alow-empty-runs`.  Should prevent accidentally
         passing empty runs, but allow the workflow above.
      3) The number of shards is greater than the number of tests.  Currently,
         this is never an error.  Personally, I think we should consider
         making this an error by default; if this happens, you are doing
         something wrong. I added a warning but did not change the behavior,
         since this warrants more discussion.
      
      Reviewed By: atrick, jdenny
      
      Differential Revision: https://reviews.llvm.org/D70105
      54a9b4c0
    • Duncan P. N. Exon Smith's avatar
      clang/Modules: Error if ReadASTBlock does not find the main module · 83dcb34b
      Duncan P. N. Exon Smith authored
      If ReadASTBlock does not find its top-level submodule, there's something
      wrong the with the PCM.  Error in that case, to avoid hitting problems
      further from the source.
      
      Note that the Swift compiler sometimes hits a case in
      CompilerInstance::loadModule where the top-level submodule mysteriously
      does not have Module::IsFromModuleFile set.  That will emit a confusing
      warn_missing_submodule, which was never intended for the main module.
      The recent audit of error-handling in ReadAST may have rooted out the
      real problem.  If not, this commit will help to clarify the real
      problem, and replace a confusing warning with an error pointing at the
      malformed PCM file.
      
      We're specifically sniffing out whether the top-level submodule was
      found/processed, in case there is a malformed module file that is
      missing it.  If there is an error encountered during ReadSubmoduleBlock
      the return status should already propagate through.  It would be nice to
      detect other missing submodules around here to catch other instances of
      warn_missing_submodule closer to the source, but that's left as a future
      exercise.
      
      https://reviews.llvm.org/D70063
      83dcb34b
    • Sanjay Patel's avatar
  2. Nov 12, 2019