Skip to content
  1. Oct 02, 2019
    • David Blaikie's avatar
    • Nico Weber's avatar
      gn build: (manually) merge r373407 · 9e763e1b
      Nico Weber authored
      llvm-svn: 373419
      9e763e1b
    • Richard Smith's avatar
      Fix crash on constant-evaluation of pseudo-destruction of a pointer. · 5e18f4db
      Richard Smith authored
      We got confused and thought we might be pseudo-destroying the pointee
      instead.
      
      llvm-svn: 373418
      5e18f4db
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Use getIntrinsicID helper · 86f864da
      Matt Arsenault authored
      llvm-svn: 373417
      86f864da
    • John McCall's avatar
      Remove TypeNodes.def from the modulemap. · c60a8242
      John McCall authored
      We currently just look for files named in the modulemap in its
      associated source directory.  This means that we can't name
      generated files, like TypeNodes.def now is, which means we can't
      explicitly mark it as textual.  But fortunately that's okay
      because (as I understand it) the most important purpose of naming
      the header in the modulemap is to ensure that it's not treated as
      public, and the search for public headers also only considers
      files in the associated source directory.  This isn't an elegant
      solution, since among other things it means that a build which
      wrote the generated files directly into the source directory would
      result in something that wouldn't build as a module, but that's
      a problem for all our other generated files as well.
      
      llvm-svn: 373416
      c60a8242
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Assume VGPR for G_FRAME_INDEX · cdfe5efe
      Matt Arsenault authored
      In principle this should behave as any other constant. However
      eliminateFrameIndex currently assumes a VALU use and uses a vector
      shift. Work around this by selecting to VGPR for now until
      eliminateFrameIndex is fixed.
      
      llvm-svn: 373415
      cdfe5efe
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Private loads always use VGPRs · bfce0c26
      Matt Arsenault authored
      llvm-svn: 373414
      bfce0c26
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Legalize 1024-bit G_BUILD_VECTOR · 05aa8a73
      Matt Arsenault authored
      This will be needed to support AGPR operations.
      
      llvm-svn: 373413
      05aa8a73
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Fix RegBankSelect for 1024-bit values · 3a657afb
      Matt Arsenault authored
      llvm-svn: 373412
      3a657afb
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] separate accounting for agprs · 075bc48a
      Stanislav Mekhanoshin authored
      Account and report agprs separately on gfx908. Other targets
      do not change the reporting.
      
      Differential Revision: https://reviews.llvm.org/D68307
      
      llvm-svn: 373411
      075bc48a
    • Michael Liao's avatar
      Fix unused variable warning. NFCI. · d838cf76
      Michael Liao authored
      llvm-svn: 373410
      d838cf76
    • Adrian Prantl's avatar
      Make yet another attempt in restoring SymbolFilePDBTests · e2385e08
      Adrian Prantl authored
      The original test was passing false to the append argument of
      FindTypes (the only use of this feature!). This patch now replicates
      that by passing a fresh TypeMap into the function where applicable.
      
      llvm-svn: 373409
      e2385e08
    • Craig Topper's avatar
      [X86] Add a DAG combine to shrink vXi64 gather/scatter indices that are... · 8c19925f
      Craig Topper authored
      [X86] Add a DAG combine to shrink vXi64 gather/scatter indices that are constant with sufficient sign bits to fit in vXi32
      
      The gather/scatter instructions can implicitly sign extend the indices. If we're operating on 32-bit data, an v16i64 index can force a v16i32 gather to be split in two since the index needs 2 registers. If we can shrink the index to the i32 we can avoid the split. It should always be safe to shrink the index regardless of the number of elements. We have gather/scatter instructions that can use v2i32 index stored in a v4i32 register with v2i64 data size.
      
      I've limited this to before legalize types to avoid creating a v2i32 after type legalization. We could check for it, but we'd also need testing. I'm also only handling build_vectors with no bitcasts to be sure the truncate will constant fold.
      
      Differential Revision: https://reviews.llvm.org/D68247
      
      llvm-svn: 373408
      8c19925f
    • John McCall's avatar
      Emit TypeNodes.def with tblgen. · a82d2fe9
      John McCall authored
      The primary goal here is to make the type node hierarchy available to
      other tblgen backends, although it should also make it easier to generate
      more selective x-macros in the future.
      
      Because tblgen doesn't seem to allow backends to preserve the source
      order of defs, this is not NFC because it significantly re-orders IDs.
      I've fixed the one (fortunately obvious) place where we relied on
      the old order.  Unfortunately, I wasn't able to share code with the
      existing AST-node x-macro generators because the x-macro schema we use
      for types is different in a number of ways.  The main loss is that
      subclasses aren't ordered together, which doesn't seem important for
      types because the hierarchy is generally very shallow with little
      clustering.
      
      llvm-svn: 373407
      a82d2fe9
    • John McCall's avatar
      Use scope qualifiers in Clang's tblgen backends to get useful · c45f8d49
      John McCall authored
      redeclaration checking.  NFC.
      
      llvm-svn: 373406
      c45f8d49
    • Dan Liew's avatar
      [CMake] Fix the value of `config.target_cflags` for non-macOS Apple platforms. Attempt #3. · bbde056b
      Dan Liew authored
      The main problem here is that `-*-version_min=` was not being passed to
      the compiler when building test cases. This can cause problems when
      testing on devices running older OSs because Clang would previously
      assume the minimum deployment target is the the latest OS in the SDK
      which could be much newer than what the device is running.
      
      Previously the generated value looked like this:
      
      `-arch arm64 -isysroot
      <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`
      
      With this change it now looks like:
      
      `-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot
      <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`
      
      This mirrors the setting of config.target_cflags on macOS.
      
      This change is made for ASan, LibFuzzer, TSan, and UBSan.
      
      To implement this a new `get_test_cflags_for_apple_platform()` function
      has been added that when given an Apple platform name and architecture
      returns a string containing the C compiler flags to use when building
      tests. This also calls a new helper function `is_valid_apple_platform()`
      that validates Apple platform names.
      
      This is the third attempt at landing the patch.
      
      The first attempt (r359305) had to be reverted (r359327) due to a buildbot
      failure. The problem was that calling `get_test_cflags_for_apple_platform()`
      can trigger a CMake error if the provided architecture is not supported by the
      current CMake configuration. Previously, this could be triggered by passing
      `-DCOMPILER_RT_ENABLE_IOS=OFF` to CMake. The root cause is that we were
      generating test configurations for a list of architectures without checking if
      the relevant Sanitizer actually supported that architecture. We now intersect
      the list of architectures for an Apple platform with
      `<SANITIZER>_SUPPORTED_ARCH` (where `<SANITIZER>` is a Sanitizer name) to
      iterate through the correct list of architectures.
      
      The second attempt (r363633) had to be reverted (r363779) due to a build
      failure. The failed build was using a modified Apple toolchain where the iOS
      simulator SDK was missing. This exposed a bug in the existing UBSan test
      generation code where it was assumed that `COMPILER_RT_ENABLE_IOS` implied that
      the toolchain supported both iOS and the iOS simulator. This is not true. This
      has been fixed by using the list `SANITIZER_COMMON_SUPPORTED_OS` for the list
      of supported Apple platforms for UBSan. For consistency with the other
      Sanitizers we also now intersect the list of architectures with
      UBSAN_SUPPORTED_ARCH.
      
      rdar://problem/50124489
      
      Differential Revision: https://reviews.llvm.org/D61242
      
      llvm-svn: 373405
      bbde056b
    • Changpeng Fang's avatar
      AMDGPU: Fix an out of date assert in addressing FrameIndex · e4ee28d1
      Changpeng Fang authored
      Reviewers:
        arsenm
      
      Differential Revision:
        https://reviews.llvm.org/D67574
      
      llvm-svn: 373404
      e4ee28d1
    • Matt Morehouse's avatar
      [libFuzzer] Remove lazy counters. · 1c8e0511
      Matt Morehouse authored
      Summary: Lazy counters haven't improved performance for large fuzz targets.
      
      Reviewers: kcc
      
      Reviewed By: kcc
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D67476
      
      llvm-svn: 373403
      1c8e0511
    • Sterling Augustine's avatar
      Determine endianness at a time when it doesn't inadvertantly clear gdb's... · 9b36c1cf
      Sterling Augustine authored
      Determine endianness at a time when it doesn't inadvertantly clear gdb's wrap_buffer via gdb.execute.
      
      Summary:
      I haven't managed a small reproduction for this bug, it involves
      complicated and deeply nested data structures with a wide variety
      of pretty printers. But in general, we shouldn't be combining
      gdb's command line interface (via gdb.execute) with pretty-printers.
      
      Subscribers: christof, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68306
      
      llvm-svn: 373402
      9b36c1cf
    • Craig Topper's avatar
      Revert r373172 "[X86] Add custom isel logic to match VPTERNLOG from 2 logic ops." · 0da163a2
      Craig Topper authored
      This seems to be causing some performance regresions that I'm
      trying to investigate.
      
      One thing that stands out is that this transform can increase
      the live range of the operands of the earlier logic op. This
      can be bad for register allocation. If there are two logic
      op inputs we should really combine the one that is closest, but
      SelectionDAG doesn't have a good way to do that. Maybe we need
      to do this as a basic block transform in Machine IR.
      
      llvm-svn: 373401
      0da163a2
    • Jordan Rupprecht's avatar
      5269091d
    • Jordan Rupprecht's avatar
      [lldb] Fix unused variable warning · a77c3ef0
      Jordan Rupprecht authored
      llvm-svn: 373399
      a77c3ef0
    • Simon Pilgrim's avatar
      CGVTables - silence static analyzer getAs<FunctionProtoType> null dereference warnings. NFCI. · 5e0a0b70
      Simon Pilgrim authored
      The static analyzer is warning about potential null dereferences, but we should be able to use castAs<FunctionProtoType> directly and if not assert will fire for us.
      
      llvm-svn: 373398
      5e0a0b70
  2. Oct 01, 2019
    • Craig Topper's avatar
      [X86] convertToThreeAddress, make sure second operand of SUB32ri is really an... · 91287057
      Craig Topper authored
      [X86] convertToThreeAddress, make sure second operand of SUB32ri is really an immediate before calling getImm().
      
      It might be a symbol instead. We can't fold those since we can't
      negate them.
      
      Similar for other SUB with immediates.
      
      Fixes PR43529.
      
      llvm-svn: 373397
      91287057
    • Simon Pilgrim's avatar
      CGExprAgg - remove duplicate code. NFCI. · f7133b79
      Simon Pilgrim authored
      Remove duplicate getAs<> call, avoiding a clang static analyzer null dereference warning.
      
      llvm-svn: 373396
      f7133b79
    • Thomas Preud'homme's avatar
      [FileCheck] Move private interface to its own header · ed117868
      Thomas Preud'homme authored
      Summary:
      Most of the class definition in llvm/include/llvm/Support/FileCheck.h
      are actually implementation details that should not be relied upon. This
      commit moves all of it in a new header file under
      llvm/lib/Support/FileCheck. It also takes advantage of the code movement
      to put the code into a new llvm::filecheck namespace.
      
      Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
      
      Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D67649
      
      llvm-svn: 373395
      ed117868
    • Sanjay Patel's avatar
    • LLVM GN Syncbot's avatar
      gn build: Merge r373392 · 081e9df1
      LLVM GN Syncbot authored
      llvm-svn: 373393
      081e9df1
    • Stephane Moore's avatar
      [clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock · e4acb971
      Stephane Moore authored
      Summary:
      OSSpinLock* are Apple/Darwin functions, but were previously located with ObjC checks as those were most closely tied to Apple platforms before.
      
      Now that there's a specific Darwin module, relocating the check there.
      
      This change was prepared by running rename_check.py.
      
      Contributed By: mwyman
      
      Reviewers: stephanemoore, dmaclach
      
      Reviewed By: stephanemoore
      
      Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits
      
      Tags: #clang-tools-extra, #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D68148
      
      llvm-svn: 373392
      e4acb971
    • Leonard Chan's avatar
      [ASan][NFC] Address remaining comments for https://reviews.llvm.org/D68287 · 8830975c
      Leonard Chan authored
      I submitted that patch after I got the LGTM, but the comments didn't
      appear until after I submitted the change. This adds `const` to the
      constructor argument and makes it a pointer.
      
      llvm-svn: 373391
      8830975c
    • Louis Dionne's avatar
      [NFC] Fix typos in libc++ documentation · 85ee0c2e
      Louis Dionne authored
      llvm-svn: 373390
      85ee0c2e
    • Leonard Chan's avatar
      [ASan] Make GlobalsMD member a const reference. · 63663616
      Leonard Chan authored
      PR42924 points out that copying the GlobalsMetadata type during
      construction of AddressSanitizer can result in exteremely lengthened
      build times for translation units that have many globals. This can be addressed
      by just making the GlobalsMD member in AddressSanitizer a reference to
      avoid the copy. The GlobalsMetadata type is already passed to the
      constructor as a reference anyway.
      
      Differential Revision: https://reviews.llvm.org/D68287
      
      llvm-svn: 373389
      63663616
    • Paul Hoad's avatar
      [clang-format] [PR43372] - clang-format shows replacements in DOS files when... · 60365021
      Paul Hoad authored
      [clang-format] [PR43372] - clang-format shows replacements in DOS files when no replacement is needed
      
      Summary:
      This is a patch to fix PR43372 (https://bugs.llvm.org/show_bug.cgi?id=43372) - clang-format can't format file with includes, ( which really keep providing replacements for already sorted headers.)
      
      A similar issue was addressed by @krasimir in {D60199}, however, this seemingly only prevented the issue when the files being formatted did not contain windows line endings (\r\n)
      
      It's possible this is related to https://twitter.com/StephanTLavavej/status/1176722938243895296 given who @STL_MSFT  works for!
      
      As people often used the existence of replacements to determine if a file needs clang-formatting, this is probably pretty important for windows users
      
      There may be a better way of comparing 2 strings and ignoring \r (which appear in both Results and Code), I couldn't choose between this idiom or the copy_if approach, but I'm happy to change it to whatever people consider more performant.
      
      Reviewers: krasimir, klimek, owenpan, ioeric
      
      Reviewed By: krasimir
      
      Subscribers: cfe-commits, STL_MSFT, krasimir
      
      Tags: #clang-format, #clang, #clang-tools-extra
      
      Differential Revision: https://reviews.llvm.org/D68227
      
      llvm-svn: 373388
      60365021
    • Alexey Bataev's avatar
      [OPENMP50]Initial codegen for declare variant implementation vendor. · 2df5f12e
      Alexey Bataev authored
      Initial implementation of global aliases emission for the declare
      variant pragma with implementation vendor context selector set.
      
      llvm-svn: 373387
      2df5f12e
    • Bardia Mahjour's avatar
      [DDG] Data Dependence Graph - Root Node · 91b62d5c
      Bardia Mahjour authored
      Summary:
      This patch adds Root Node to the DDG. The purpose of the root node is to create a single entry node that allows graph walk iterators to iterate through all nodes of the graph, making sure that no node is left unvisited during a graph walk (eg. SCC or DFS). Once the DDG is fully constructed it will have exactly one root node. Every node in the graph is reachable from the root. The algorithm for connecting the root node is based on depth-first-search that keeps track of visited nodes to try to avoid creating unnecessary edges.
      
      Authored By: bmahjour
      
      Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert
      
      Reviewed By: Meinersbur
      
      Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto, ppc-slack
      
      Tag: #llvm
      
      Differential Revision: https://reviews.llvm.org/D67970
      
      llvm-svn: 373386
      91b62d5c
    • Louis Dionne's avatar
      [libc++] Re-apply workaround for D63883 · bcab9518
      Louis Dionne authored
      In reality, this workaround is for the fact that LIBCXX_CXX_ABI=libcxxabi
      can't be specified on Linux, since libc++abi isn't shipped with the system.
      Since the build bots explicitly specify LIBCXX_CXX_ABI=libcxxabi, they fail
      unless we apply the workaround.
      
      llvm-svn: 373385
      bcab9518
    • Louis Dionne's avatar
      [libc++] Remove workaround for D63883 · 32f869e0
      Louis Dionne authored
      I tried applying D63883 three times and could never get around to
      making it work. I'm giving up on that for now, but soon this should
      be irrelevant anyway since all builds will move to the monorepo
      (where we're always using the in-tree libc++abi unless explicitly
      specified otherwise).
      
      llvm-svn: 373384
      32f869e0
    • Alina Sbirlea's avatar
      [MemorySSA] Check for unreachable blocks when getting last definition. · 890090f7
      Alina Sbirlea authored
      If a single predecessor is found, still check if the block is
      unreachable. The test that found this had a self loop unreachable block.
      Resolves PR43493.
      
      llvm-svn: 373383
      890090f7
    • Jakub Kuderski's avatar
      Add a missing pass in ARM O3 pipeline · 7ed4fb38
      Jakub Kuderski authored
      llvm-svn: 373382
      7ed4fb38
    • Louis Dionne's avatar
      [libc++abi] Remove uses of C++ headers when possible · 04501a22
      Louis Dionne authored
      This reduces the (circular) dependency of libc++abi on a C++ standard
      library. Outside of the demangler which uses fancier C++ features, the
      only C++ headers now required by libc++abi are pretty much <new> and
      <exception>, and that's because libc++abi defines some types that are
      declared in those headers.
      
      llvm-svn: 373381
      04501a22
Loading