1. Aug 24, 2019
    • Adrian Prantl's avatar
      Upstream support for macCatalyst Mach-O binaries. · f869ec8d
      Adrian Prantl authored
      On macOS one Mach-O slice can contain multiple load commands: One load
      command for being loaded into a macOS process and one load command for
      being loaded into a macCatalyst process. This patch adds support for
      the new load command and makes sure ObjectFileMachO returns the
      Architecture that matches the Module.
      
      Differential Revision: https://reviews.llvm.org/D66626
      
      llvm-svn: 369814
      f869ec8d
    • Peter Collingbourne's avatar
      Move a break into the correct place. NFCI. · f7ca5746
      Peter Collingbourne authored
      Should silence new C fallthrough warning.
      
      llvm-svn: 369813
      f7ca5746
    • Sanjay Patel's avatar
      [x86] add tests for bt/test; NFC · a3b831ae
      Sanjay Patel authored
      llvm-svn: 369812
      a3b831ae
    • Julie Hockett's avatar
      [clang-doc] Bump BitcodeWriter max line number to 32U · 245154de
      Julie Hockett authored
      PR43039 reports hitting the assert on a very large file, so bumping this
      to allow for larger files.
      
      Differential Revision: https://reviews.llvm.org/D66681
      
      llvm-svn: 369811
      245154de
    • Guillaume Chatelet's avatar
      [LLVM][NFC] remove unused fields · b7be5b90
      Guillaume Chatelet authored
      Summary:
      Here is the commit introducing the fields
      https://github.com/llvm/llvm-project/commit/cf6749e4c091
      
      It dates back from 2006 and was used by AArch64 backend.
      There is no more reference to these fields in the whole codebase so I think it's fine.
      
      Reviewers: courbet
      
      Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66683
      
      llvm-svn: 369810
      b7be5b90
    • Lang Hames's avatar
      [ORC] Remove query dependencies when symbols are resolved. · 7371fb42
      Lang Hames authored
      If the dependencies are not removed then a late failure (one symbol covered by
      the query failing after others have already been resolved) can result in an
      attempt to detach the query from already finalized symbol, resulting in an
      assert/crash. This patch fixes the issue by removing query dependencies in
      JITDylib::resolve for symbols that meet the required state.
      
      llvm-svn: 369809
      7371fb42
    • Lang Hames's avatar
      [ORC] Fix a FIXME: Propagate errors to dependencies. · e00585c7
      Lang Hames authored
      When symbols are failed (via MaterializationResponsibility::failMaterialization)
      any symbols depending on them will now be moved to an error state. Attempting
      to resolve or emit a symbol in the error state (via the notifyResolved or
      notifyEmitted methods on MaterializationResponsibility) will result in an error.
      If notifyResolved or notifyEmitted return an error due to failure of a
      dependence then the caller should log or discard the error and call
      failMaterialization to propagate the failure to any queries waiting on the
      symbols being resolved/emitted (plus their dependencies).
      
      llvm-svn: 369808
      e00585c7
    • Lang Hames's avatar
      [ORC] Fix an incorrect comment. · a47d6222
      Lang Hames authored
      llvm-svn: 369807
      a47d6222
    • Jessica Paquette's avatar
      [AArch64][GlobalISel] Import XRO load/store patterns instead of custom selection · 83fe56b3
      Jessica Paquette authored
      Instead of using custom C++ in `earlySelect` for loads and stores, just import
      the patterns.
      
      Remove `earlySelectLoad`, since we can just import the work it's doing.
      
      Some minor changes to how `ComplexRendererFns` are returned for the XRO
      addressing modes. If you add immediates in two steps, sometimes they are not
      imported properly and you only end up with one immediate. I'm not sure if this
      is intentional.
      
      - Update load-addressing-modes.mir to include the instructions we can now
        import.
      
      - Add a similar test, store-addressing-modes.mir to show which store opcodes we
        currently import, and show that we can pull in shifts etc.
      
      - Update arm64-fastisel-gep-promote-before-add.ll to use FastISel instead of
        GISel. This test failed with GISel because GISel folds the gep into the load.
        The test checks that FastISel doesn't fold non-pointer-width adds into loads.
        GISel on the other hand, produces a G_CONSTANT of -128 for the add, and then
        a G_GEP, which must be pointer-width.
      
      Note that we don't get STRBRoX right now. It seems like the importer can't
      handle `FPR8Op:{ *:[Untyped] }:$Rt` source operands. So, those are not currently
      supported.
      
      Differential Revision: https://reviews.llvm.org/D66679
      
      llvm-svn: 369806
      83fe56b3
    • Volkan Keles's avatar
      [GlobalISel] Legalizer: Retry combining illegal artifacts as long as there new artifacts · 277631e3
      Volkan Keles authored
      Summary:
      Currently, Legalizer aborts if it’s unable to legalize artifacts. However, it’s
      possible to combine them after processing the rest of the instruction because
      the legalization is likely to generate more artifacts that allow ArtifactCombiner
      to combine away them.
      
      Instead, move illegal artifacts to another list called RetryList and wait until all of the
      instruction in InstList are legalized. After that, check if there is any new artifacts and
      try to combine them again if that’s the case. If not, abort. The idea is similar to D59339,
      but the approach is a bit different.
      
      This patch fixes the issue described above, but the legalizer still may be unable to handle
      some cases depending on when to legalize artifacts. So, in the long run, we probably need
      a different legalization strategy that handles this dependency in a better way.
      
      Reviewers: dsanders, aditya_nandakumar, qcolombet, arsenm, aemerson, paquette
      
      Reviewed By: dsanders
      
      Subscribers: jvesely, wdng, nhaehnle, rovka, javed.absar, hiraditya, Petar.Avramovic, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D65894
      
      llvm-svn: 369805
      277631e3
    • Johannes Doerfert's avatar
      [Attributor] Manifest alignment in load and store instructions · 5a5a1399
      Johannes Doerfert authored
      Summary:
      We can now manifest alignment information in load/store instructions if
      the pointer is known to have a better alignment.
      
      Reviewers: uenoku, sstefan1, lebedev.ri
      
      Subscribers: hiraditya, bollu, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66567
      
      llvm-svn: 369804
      5a5a1399
    • Benjamin Kramer's avatar
      Do a sweep of symbol internalization. NFC. · dc5f805d
      Benjamin Kramer authored
      llvm-svn: 369803
      dc5f805d
    • Craig Topper's avatar
      [X86] Move a transform out of combineConcatVectorOps so we don't prematurely... · bc173d4c
      Craig Topper authored
      [X86] Move a transform out of combineConcatVectorOps so we don't prematurely turn CONCAT_VECTORS into INSERT_SUBVECTORS.
      
      CONCAT_VECTORS and INSERT_SUBVECTORS can both call combineConcatVectorOps,
      but we shouldn't produce INSERT_SUBVECTORS from there. We should
      keep CONCAT_VECTORS until vector legalization.
      
      Noticed while looking at the madd_quad_reduction test from madd.ll
      
      llvm-svn: 369802
      bc173d4c
    • Alexey Bataev's avatar
      [OPENMP5]Use nonmonotonic modifier by default for non-static and · 07a3b592
      Alexey Bataev authored
      non-ordered loops.
      
      According to OpenMP 5.0, 2.9.2 Worksharing-Loop Construct, Desription, If the static schedule kind is specified or if the ordered clause is specified, and if the nonmonotonic modifier is not specified, the effect is as if the monotonic modifier is specified. Otherwise, unless the monotonic modifier is specified, the effect is as if the nonmonotonic modifier is specified.
      The first part of this requirement is implemented in runtime. Patch adds
      support for the second, nonmonotonic, part of this requirement.
      
      llvm-svn: 369801
      07a3b592
    • Louis Dionne's avatar
      [libc++] Fix typo in documentation for LIBCXX_HERMETIC_STATIC_LIBRARY · 236f8012
      Louis Dionne authored
      Thanks to Yichen Yan for the patch.
      Differential Revision: https://reviews.llvm.org/D66675
      
      llvm-svn: 369800
      236f8012
    • Wei Mi's avatar
      Fix some warnings introduced by r369798. · f491d863
      Wei Mi authored
      llvm-svn: 369799
      f491d863
    • Wei Mi's avatar
      [SampleFDO] Add ExtBinary format to support extension of binary profile. · be907324
      Wei Mi authored
      This is a patch split from https://reviews.llvm.org/D66374. It tries to add
      a new format of profile called ExtBinary. The format adds a section header
      table to the profile and organize the profile in sections, so the future
      extension like adding a new section or extending an existing section will be
      easier while keeping backward compatiblity feasible.
      
      Differential Revision: https://reviews.llvm.org/D66513
      
      llvm-svn: 369798
      be907324
    • Roland Froese's avatar
      [PowerPC] Expand v1i128 smin · b4051e57
      Roland Froese authored
      The smin opcode and friends for v1i128 are incorrectly marked as legal for PPC.
      Change them to expand.
      
      Differential Revision: https://reviews.llvm.org/D64960
      
      llvm-svn: 369797
      b4051e57
    • Alexey Bataev's avatar
      [OPENMP][NVPTX]Use __syncwarp() to reconverge the threads. · 0366168f
      Alexey Bataev authored
      Summary:
      In Cuda 9.0 it is not guaranteed that threads in the warps are
      convergent. We need to use __syncwarp() function to reconverge
      the threads and to guarantee the memory ordering among threads in the
      warps.
      This is the first patch to fix the problem with the test
      libomptarget/deviceRTLs/nvptx/src/sync.cu on Cuda9+.
      This patch just replaces calls to __shfl_sync() function with the call
      of __syncwarp() function where we need to reconverge the threads when we
      try to modify the value of the parallel level counter.
      
      Reviewers: grokos
      
      Subscribers: guansong, jfb, jdoerfert, caomhin, kkwli0, openmp-commits
      
      Tags: #openmp
      
      Differential Revision: https://reviews.llvm.org/D65013
      
      llvm-svn: 369796
      0366168f
    • Philip Reames's avatar
      Fix a bug in just submitted rL369789 · 9cb059fd
      Philip Reames authored
      Started implementing the vector case and realized the scalar case hadn't handled the GEP producing a different type than the base correctly.  It's entertaining seeing what slips through review when we're focused on the 'hard' parts.  :(
      
      Also adding an extra vector test as it happened to be in workspace and wasn't worth separating.
      
      llvm-svn: 369795
      9cb059fd
    • Matt Arsenault's avatar
      RegScavenger: Use Register · 2fd1afe8
      Matt Arsenault authored
      llvm-svn: 369794
      2fd1afe8
    • Amaury Sechet's avatar
      [X86] Automatically generate load-local-v3i1.ll . NFC · 1fd2e69e
      Amaury Sechet authored
      llvm-svn: 369793
      1fd2e69e
    • Craig Topper's avatar
      bccd1832
    • Nathan Huckleberry's avatar
      [Sema] Don't warn on printf('%hd', [char]) (PR41467) · cc01d642
      Nathan Huckleberry authored
      Summary: Link: https://bugs.llvm.org/show_bug.cgi?id=41467
      
      Reviewers: rsmith, nickdesaulniers, aaron.ballman, lebedev.ri
      
      Reviewed By: nickdesaulniers, aaron.ballman, lebedev.ri
      
      Subscribers: lebedev.ri, nickdesaulniers, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D66186
      
      llvm-svn: 369791
      cc01d642
    • Manoj Gupta's avatar
      Revert r369233. · 30232770
      Manoj Gupta authored
      This breaks building of some projects like libfuse and alsa-lib
      that now fail when linking.
      Error details in PR43092.
      
      llvm-svn: 369790
      30232770
    • Philip Reames's avatar
      [InstCombine] icmp eq/ne (gep inbounds P, Idx..), null -> icmp eq/ne P, null · 5b02cfa0
      Philip Reames authored
      This generalizes the isGEPKnownNonNull rule from ValueTracking to apply when we do not know if the base is non-null, and thus need to replace one condition with another.
      
      The core notion is that since an inbounds GEP can only form null if the base pointer is null and the offset is zero. However, if the offset is non-zero, the the "inbounds" marker makes the result poison. Thus, we're free to ignore the case where the offset is non-zero. Similarly, there's no case under which a non-null base can result in a null result without generating poison.
      
      Differential Revision: https://reviews.llvm.org/D66608
      
      llvm-svn: 369789
      5b02cfa0
    • Saleem Abdulrasool's avatar
      Windows: explicitly cast constants to `DWORD` · e7823a53
      Saleem Abdulrasool authored
      STATUS_SINGLE_STEP and STATUS_BREAKPOINT are defined as 0x8------ which
      is negative and thus can't be implicitly narrowed to a DWORD which is
      unsigned.  The value is defined differently across winnt.h and ntstatus.h.
      
      Patch by Gwen Mittertreiner!
      
      llvm-svn: 369788
      e7823a53
    • Amaury Sechet's avatar
      [AMDGPU] Automatically generate various tests. NFC · 05f56a1d
      Amaury Sechet authored
      llvm-svn: 369787
      05f56a1d
    • Johannes Doerfert's avatar
      [BasicAA] Use dereferenceability to reason about aliasing · 22e6e108
      Johannes Doerfert authored
      Summary:
      We already use the fact that an object with known size X does not alias
      another objection of size Y > X before. With this commit, we use
      dereferenceability information to determine a lower bound for Y and not
      only rely on the user provided query size.
      
      The result for @global_and_deref_arg_2() and @local_and_deref_ret_2()
      in test/Analysis/BasicAA/dereferenceable.ll improved with this patch.
      
      Reviewers: asbirlea, chandlerc, hfinkel, sanjoy
      
      Subscribers: hiraditya, bollu, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66157
      
      llvm-svn: 369786
      22e6e108
    • Johannes Doerfert's avatar
      [Attributor] Manifest constant return values · 23400e61
      Johannes Doerfert authored
      Summary:
      If the unique return value is a constant we now replace call uses with
      that constant.
      
      Reviewers: sstefan1, uenoku
      
      Subscribers: hiraditya, bollu, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66551
      
      llvm-svn: 369785
      23400e61
    • Johannes Doerfert's avatar
      [Attributor] Deal with shrinking dereferenceability in a loop · 785fad32
      Johannes Doerfert authored
      Summary:
      If we have a loop in which the dereferenceability of a pointer decreases
      we did slowly decrease it iteration by iteration, leading to a timeout.
      With this patch we detect such circular reasoning and indicate a
      fixpoint early.
      
      Reviewers: uenoku, sstefan1
      
      Subscribers: hiraditya, bollu, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66558
      
      llvm-svn: 369784
      785fad32
    • Benjamin Kramer's avatar
      Fix clang-tidy warning in clang-tidy · ccc272cd
      Benjamin Kramer authored
      argument name 'FixDescription' in comment does not match parameter name 'Description'
      
      Patch by Nils Barth!
      
      llvm-svn: 369783
      ccc272cd
    • Nathan Huckleberry's avatar
      Allow Compiler.h to be included in C files and fix fallthrough warnings · 5808077b
      Nathan Huckleberry authored
      Summary:
      Since clang does not support comment style fallthrough annotations
      these should be switched to macros defined in Compiler.h. This
      requires some fixing to Compiler.h.
      
      Original patch: https://reviews.llvm.org/D66487
      
      Reviewers: nickdesaulniers, aaron.ballman, xbolva00, rsmith
      
      Reviewed By: nickdesaulniers, aaron.ballman, rsmith
      
      Subscribers: rsmith, sfertile, ormris, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66609
      
      llvm-svn: 369782
      5808077b
    • Shafik Yaghmour's avatar
      Debug Info: Support for DW_AT_export_symbols for anonymous structs · 5dca5efc
      Shafik Yaghmour authored
      This implements the DWARF 5 feature described in:
      
      http://dwarfstd.org/ShowIssue.php?issue=141212.1
      
      To support recognizing anonymous structs:
      
        struct A {
          struct { // Anonymous struct
              int y;
          };
        }   a;
      
      This patch adds a new (DI)flag to LLVM metadata:
      
      ExportSymbols
      
      Differential Revision: https://reviews.llvm.org/D66352
      
      llvm-svn: 369781
      5dca5efc
    • Craig Topper's avatar
      [SelectionDAG][X86] Enable iX SimplifyDemandedBits to vXi1... · e7211bb5
      Craig Topper authored
      [SelectionDAG][X86] Enable iX SimplifyDemandedBits to vXi1 SimplifyDemandedVectorElts simplification. Add a hack to X86 to avoid a regression
      
      Patch showing the effect of enabling bool vector oversimplification.
      
      Non-VLX builds can simplify a kshift shuffle, but VLX builds simplify:
      
      insert_subvector v8i zeroinitializer, v2i --> insert_subvector v8i undef, v2i
      
      Preventing the removal of the AND to clear the upper bits of result
      
      Differential Revision: https://reviews.llvm.org/D53022
      
      llvm-svn: 369780
      e7211bb5
    • Anastasia Stulova's avatar
      [OpenCL] Renamed value of std flag in C++ mode. · ad5047d2
      Anastasia Stulova authored
       
      Clang should accept -std=clc++ (not -std=c++!) for OpenCL.
      
      This was forgotten in r367008.
      
      llvm-svn: 369779
      ad5047d2
    • Jeremy Morse's avatar
      [DebugInfo] Remove invalidated locations during LiveDebugValues · 0ae54981
      Jeremy Morse authored
      LiveDebugValues gives variable locations to blocks, but it should also take
      away. There are various circumstances where a variable location is known
      until a loop backedge with a different location is detected. In those
      circumstances, where there's no agreement on the variable location, it
      should be undef / removed, otherwise we end up picking a location that's
      valid on some loop iterations but not others.
      
      However, LiveDebugValues doesn't currently do this, see the new testcase
      attached. Without this patch, the location of !3 is assumed to be %bar
      through the loop. Once it's added to the In-Locations list, it's never
      removed, even though the later dbg.value(0... of !3 makes the location
      un-knowable.
      
      This patch checks during block-location-joining to see whether any
      previously-present locations have been removed in a predecessor. If they
      have, the live-ins have changed, and the block needs reprocessing.
      Similarly, in transferTerminator, assign rather than |= the Out-Locations
      after processing a block, as we may have deleted some previously valid
      locations. This will mean that LiveDebugValues performs more propagation
       -- but that's necessary for it being correct.
      
      Differential Revision: https://reviews.llvm.org/D66599
      
      llvm-svn: 369778
      0ae54981
    • Artem Belevich's avatar
      Fixed a typo. · 4c9d2ab1
      Artem Belevich authored
      llvm-svn: 369777
      4c9d2ab1
    • Sanjay Patel's avatar
      [SLP] use range-for loops, fix formatting; NFC · 5a5d44e8
      Sanjay Patel authored
      These are part of D57059, but that patch doesn't apply cleanly to trunk
      at this point, so we might as well remove some of the noise.
      
      llvm-svn: 369776
      5a5d44e8
    • Alexey Bataev's avatar
      [OPENMP5.0]Add support for device_type clause in declare target · 729e242a
      Alexey Bataev authored
      construct.
      
      OpenMP 5.0 introduced new clause for declare target directive, device_type clause, which may accept values host, nohost, and any. Host means
      that the function must be emitted only for the host, nohost - only for
      the device, and any - for both, device and the host.
      
      llvm-svn: 369775
      729e242a