1. Feb 24, 2020
    • Mikhail Maltsev's avatar
      [ARM,MVE] Remove 64-bit variants of vbrsrq* intrinsics · 12fed51c
      Mikhail Maltsev authored
      Summary:
      According to the ACLE the vbrsrq* intrinsics don't accept vectors
      with 64-bit elements (and neither does the corresponding VBRSR
      instruction).
      
      Reviewers: simon_tatham, dmgreen, MarkMurrayARM, ostannard
      
      Reviewed By: simon_tatham
      
      Subscribers: kristof.beyls, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D75038
      12fed51c
    • David Green's avatar
      [ARM] FP16 bitcast test. NFC · f287bb8c
      David Green authored
      f287bb8c
    • Simon Pilgrim's avatar
      [CostModel][X86] Try to check against common prefixes before using target-specific cpu checks · eaa41e10
      Simon Pilgrim authored
      SLM/GLM is still a mess so not all of them have been updated yet.
      eaa41e10
    • Kirill Bobyrev's avatar
      a4370b2e
    • Benjamin Kramer's avatar
      [ORC] Remove spammy debug print · 8c893cac
      Benjamin Kramer authored
      8c893cac
    • Kerry McLaughlin's avatar
      [AArch64][SVE] Add intrinsics for SVE2 cryptographic instructions · f2ff1534
      Kerry McLaughlin authored
      Summary:
      Implements the following SVE2 intrinsics:
       - @llvm.aarch64.sve.aesd
       - @llvm.aarch64.sve.aesimc
       - @llvm.aarch64.sve.aese
       - @llvm.aarch64.sve.aesmc
       - @llvm.aarch64.sve.rax1
       - @llvm.aarch64.sve.sm4e
       - @llvm.aarch64.sve.sm4ekey
      
      Reviewers: sdesmalen, c-rhodes, dancgr, cameron.mcinally, efriedma, rengolin
      
      Reviewed By: sdesmalen
      
      Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D74833
      f2ff1534
    • Benjamin Kramer's avatar
      Silence compiler warnings · 3ac37eb9
      Benjamin Kramer authored
      mlir/lib/Parser/Parser.cpp:4484:15: warning: 'parseAssignmentList' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        ParseResult parseAssignmentList(SmallVectorImpl<OperandType> &lhs,
                    ^
      mlir/include/mlir/IR/OpImplementation.h:662:3: note: overridden virtual function is here
        parseAssignmentList(SmallVectorImpl<OperandType> &lhs,
        ^
      mlir/lib/Parser/Parser.cpp:4488:12: warning: unused variable 'type' [-Wunused-variable]
            Type type;
                 ^
      3ac37eb9
    • Benjamin Kramer's avatar
      Add a basic tiling pass for parallel loops · bc1947a6
      Benjamin Kramer authored
      This exploits the fact that the iterations of parallel loops are
      independent so tiling becomes just an index transformation. This pass
      only tiles the innermost loop of a loop nest.
      
      The ultimate goal is to allow vectorization of the tiled loops, but I
      don't think we're there yet with the current rewriting, as the tiled
      loops don't have a constant trip count.
      
      Differential Revision: https://reviews.llvm.org/D74954
      bc1947a6
    • Bevin Hansson's avatar
      [Intrinsic] Add fixed point saturating division intrinsics. · 6e561d1c
      Bevin Hansson authored
      Summary:
      This patch adds intrinsics and ISelDAG nodes for signed
      and unsigned fixed-point division:
      
      ```
      llvm.sdiv.fix.sat.*
      llvm.udiv.fix.sat.*
      ```
      
      These intrinsics perform scaled, saturating division
      on two integers or vectors of integers. They are
      required for the implementation of the Embedded-C
      fixed-point arithmetic in Clang.
      
      Reviewers: bjope, leonardchan, craig.topper
      
      Subscribers: hiraditya, jdoerfert, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D71550
      6e561d1c
    • Calixte Denizet's avatar
      [profile] Don't dump counters when forking and don't reset when calling exec** functions · 8f46269f
      Calixte Denizet authored
      Summary:
      There is no need to write out gcdas when forking because we can just reset the counters in the parent process.
      Let say a counter is N before the fork, then fork and this counter is set to 0 in the child process.
      In the parent process, the counter is incremented by P and in the child process it's incremented by C.
      When dump is ran at exit, parent process will dump N+P for the given counter and the child process will dump 0+C, so when the gcdas are merged the resulting counter will be N+P+C.
      About exec** functions, since the current process is replaced by an another one there is no need to reset the counters but just write out the gcdas since the counters are definitely lost.
      To avoid to have lists in a bad state, we just lock them during the fork and the flush (if called explicitely) and lock them when an element is added.
      
      Reviewers: marco-c
      
      Reviewed By: marco-c
      
      Subscribers: hiraditya, cfe-commits, #sanitizers, llvm-commits, sylvestre.ledru
      
      Tags: #clang, #sanitizers, #llvm
      
      Differential Revision: https://reviews.llvm.org/D74953
      8f46269f
    • Pavel Labath's avatar
      Use new FailedWithMessage matcher in DWARFDebugLineTest.cpp · 9b23024c
      Pavel Labath authored
      Summary:
      This should produce slightly better error messages in case of failures.
      Only slightly, because this code was pretty careful about that to begin
      with -- I've seen code which does much worse.
      
      Reviewers: jhenderson, dblaikie
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D74899
      9b23024c
    • Bevin Hansson's avatar
      [MC] Widen the functional unit type from 32 to 64 bits. · c3f36acc
      Bevin Hansson authored
      Summary:
      The type used to represent functional units in MC is
      'unsigned', which is 32 bits wide. This is currently
      not a problem in any upstream target as no one seems
      to have hit the limit on this yet, but in our
      downstream one, we need to define more than 32
      functional units.
      
      Increasing the size does not seem to cause a huge
      size increase in the binary (an llc debug build went
      from 1366497672 to 1366523984, a difference of 26k),
      so perhaps it would be acceptable to have this patch
      applied upstream as well.
      
      Subscribers: hiraditya, jsji, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D71210
      c3f36acc
    • Raphael Isemann's avatar
      [lldb] Disable auto fix-its when evaluating expressions in the test suite · c131dfef
      Raphael Isemann authored
      Summary:
      Currently the test suite runs with enabled automatically applied Clang fix-its for expressions.
      This is causing that sometimes incorrect expressions in tests are still evaluated even though they
      are actually incorrect. Let's disable this feature in the test suite so that we know when expressions
      are wrong and leave the fix-it testing to the dedicated tests for that feature.
      
      Also updates the `lang/cpp/operators/` test as it seems Clang needs the `struct` keywords
      before C and would otherwise fail without fixits.
      
      Reviewers: jingham, JDevlieghere, shafik
      
      Reviewed By: JDevlieghere, shafik
      
      Subscribers: shafik, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D74957
      c131dfef
    • Pavel Labath's avatar
      [lldb/test] simplify basic-elf.yaml · be3b448c
      Pavel Labath authored
      Explicit dynsym/dynstr sections were added in a6370d57 to compensate for
      a yaml2obj change D74764. This test doesn't need those sections, so
      instead I just delete the explicit section blocks, and also the
      "DynamicSymbols" block, which triggers their implicit generation.
      be3b448c
    • Pavel Labath's avatar
      [lldb/DWARF] Don't index dwp file multiple times · 0f7cfb25
      Pavel Labath authored
      Summary:
      When we added support for type units in dwo files, we changed the
      "manual" dwarf index to index _all_ dwarf units in the dwo file instead
      of just the split unit belonging to our skeleton unit. This was fine for
      dwo files, as they contain only a single compile units and type units do
      not have a split type unit which would point to them.
      
      However, this does not work for dwp files because, these files do
      contain multiple split compile units, and the current approach means
      that each unit gets indexed multiple times (once for each split unit =>
      n^2 complexity).
      
      This patch teaches the manual dwarf index to treat dwp files specially.
      Any type units in the dwp file added to the main list of compile units
      and indexed with them in a single batch. Split compile units in dwp
      files are still indexed as a part of their skeleton unit -- this is done
      because we need the DW_AT_language attribute from the skeleton unit to
      index them properly.
      
      Handling of dwo files remains unchanged -- all units (type and skeleton)
      are indexed when we reach the dwo file through the split unit.
      
      Reviewers: clayborg, JDevlieghere, aprantl
      
      Subscribers: arphaman, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D74964
      0f7cfb25
    • Sam Parker's avatar
      [ARM][MVE] Combine more extending masked loads · 03756a41
      Sam Parker authored
      For MVE, don't look at the users of the extending loads so that more
      as desirable for folding.
      
      Differential Revision: https://reviews.llvm.org/D74958
      03756a41
    • Raphael Isemann's avatar
      [lldb] Remove all the 'current_id' logging counters from the lookup code. · e657a1eb
      Raphael Isemann authored
      Summary:
      We have a lot of code in our lookup code to pass around `current_id` counters which end up in our logs like this:
      ```
      AOCTV::FT [234] Found XYZ
      ```
      
      This patch removes all of this code because:
      * I'm splitting up all humongous functions, so I need to write more and more boilerplate to pass around these ids.
      * I never saw any similar counters in the LLDB/LLVM code base.
      * They're essentially globals and the last thing we need in LLDB is even more global state.
      * They're not really useful when readings logs. It doesn't help that there isn't just 1 or 2 counters, but 12 (!) unique counters. I always thought that if I see two identical counter values in those brackets it's the same lookup request, but it seems that's only true by accident (and you can't know which of the 12 counters is actually printed without reading the code). The only time I know I can trust the counters is when it's obvious from the log that it's the same counter like in the log below, but then why have the counters in the first place?
      
      ```
       LayoutRecordType[28] on (ASTContext*)0x00007FFA1C840200 'scratch ASTContext' for (RecordDecl*)0x00007FFA0AAE8CF0 [name = '__tree']
       LRT[28] returned:
       LRT[28]   Original = (RecordDecl*)%p
       LRT[28]   Size = %lld
       LRT[28]   Alignment = %lld
       LRT[28]   Fields:
       LRT[28]     (FieldDecl*)0x00007FFA1A13B1D0, Name = '__begin_node_', Offset = 0 bits
       LRT[28]     (FieldDecl*)0x00007FFA1C08FD30, Name = '__pair1_', Offset = 64 bits
       LRT[28]     (FieldDecl*)0x00007FFA1C061210, Name = '__pair3_', Offset = 128 bits
       LRT[28]   Bases:
      ```
      
      Reviewers: labath, shafik, JDevlieghere
      
      Reviewed By: labath, shafik, JDevlieghere
      
      Subscribers: abidh, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D74951
      e657a1eb
    • Lang Hames's avatar
      [JITLink] Add a MachO x86-64 GOT and Stub bypass optimization. · 27a79b72
      Lang Hames authored
      This optimization bypasses GOT loads and calls/branches through stubs when the
      ultimate target of the access/branch is found to be within range of the
      reference.
      
      Extra debugging output is also added to the generic JITLink algorithm and
      basic GOT and Stubs builder utility to aid debugging.
      27a79b72
    • Craig Topper's avatar
      [X86] When creating X86ISD::MGATHER nodes from AVX2 gather intrinsics, cast... · 7a7146cf
      Craig Topper authored
      [X86] When creating X86ISD::MGATHER nodes from AVX2 gather intrinsics, cast the mask to integer type.
      
      The gather intrinsics use a floating point mask when the result
      type is FP. But we call DemandedBits on the mask assuming its an
      integer type. We also use integer types when we create it from
      generic IR. So add a bitcast to the intrinsic path to guarantee
      the integer type.
      7a7146cf
    • Craig Topper's avatar
      [X86] Use custom isel for gather/scatter instructions. · f1b8ec33
      Craig Topper authored
      The type profile we use for the isel patterns lied about how
      many operands the gather/scatter node has to skip the index
      and scale operands. This allowed us to expand the baseptr
      operand into base, displacement, and segment and then merge
      the index and scale with them in the final instruction during
      isel. This is kind of a hack that relies on isel not checking the
      number of operands at all.
      
      This commit switches to custom isel where we can manage this
      directly without relying on holes in the isel checking.
      f1b8ec33
    • Craig Topper's avatar
      [SelectionDAG] Remove ISD::LIFETIME_START/LIFETIME_END from assert in getMemIntrinsicNode. · 3a6bb32b
      Craig Topper authored
      These appear to have their own SDNode type and shouldn't use
      MemIntrinsicSDNode.
      3a6bb32b
    • Siva Chandra Reddy's avatar
      [libc] Add a README to the sub-directories under the utils directory. · 4d812acb
      Siva Chandra Reddy authored
      Also, the source layout document has been updated to reflect the current
      layout of the `utils` directory.
      
      Reviewers: PaulkaToast
      
      Differential Revision: https://reviews.llvm.org/D74502
      4d812acb
    • Shengchen Kan's avatar
    • QingShan Zhang's avatar
      [NFC][PowerPC] Refactor the tryAndWithMask() · 8b3a62dc
      QingShan Zhang authored
      Split the tryAndWithMask into several small calls.
      
      Differential Revision: https://reviews.llvm.org/D72250
      8b3a62dc
    • Hongtao Yu's avatar
      IR printing for single function with the new pass manager. · bae33a7c
      Hongtao Yu authored
      Summary:
      The IR printing always prints out all functions in a module with the new pass manager, even with -filter-print-funcs specified. This is being fixed in this change. However, there are two exceptions, i.e, with user-specified wildcast switch -filter-print-funcs=* or -print-module-scope, under which IR of all functions should be printed.
      
      Test Plan:
      make check-clang
      make check-llvm
      
      Reviewers: wenlei
      
      Reviewed By: wenlei
      
      Subscribers: wenlei, hiraditya, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D74814
      bae33a7c
    • Craig Topper's avatar
      [SelectionDAG] Remove SelectionDAG::getTargetMemSDNode now that its not used. · 384d5e33
      Craig Topper authored
      Targets are expected to use getMemIntrinsicNode and not provide
      their own subclasses. X86 was previously the only user.
      384d5e33
    • Craig Topper's avatar
      [X86] Remove most X86 specific subclasses of MemSDNode. Just use a... · 5a705186
      Craig Topper authored
      [X86] Remove most X86 specific subclasses of MemSDNode. Just use a MemIntrinsicSDNode as we usually do.
      
      Leave the gather/scatter subclasses, but make them inherit from
      MemIntrinsicSDNode and delete their constructor and destructor.
      This way we can still have the getIndex, getMask, etc. convenience
      functions.
      5a705186
    • Craig Topper's avatar
      [X86] Enable the use of movlps for i64 atomic load on 32-bit targets with sse1. · 15b6aa74
      Craig Topper authored
      Still a little room for improvement by using movlps to store to
      the stack temporary needed to move data out of the xmm register
      after the load.
      15b6aa74
    • Craig Topper's avatar
    • Jonas Paulsson's avatar
      [SystemZ] Support the kernel back chain. · 82879c29
      Jonas Paulsson authored
      In order to build the Linux kernel, the back chain must be supported with
      packed-stack. The back chain is then stored topmost in the register save
      area.
      
      Review: Ulrich Weigand
      
      Differential Revision: https://reviews.llvm.org/D74506
      82879c29
    • Sam McCall's avatar
    • Aaron Ballman's avatar
    • Sam McCall's avatar
      [clangd] Reapply b60896fa Fall back to selecting token-before-cursor if... · be6d07c9
      Sam McCall authored
      [clangd] Reapply b60896fa Fall back to selecting token-before-cursor if token-after-cursor fails.
      
      This reverts commit b4b9706d.
      Now avoiding expected<vector<selection>> in favor of expected<vector<unique_ptr<selection>>>
      be6d07c9
    • Florian Hahn's avatar
      [AArch64] Update new test. · 335e21f9
      Florian Hahn authored
      Changed after 7769030b.
      335e21f9
    • Florian Hahn's avatar
      Recommit "[PatternMatch] Match XOR variant of unsigned-add overflow check." · 7769030b
      Florian Hahn authored
      This version fixes a buildbot failure cause by picking the wrong insert
      point for XORs. We cannot pick the XOR binary operator as insert point,
      as it is not guaranteed that both input operands for the overflow
      intrinsic are defined before it.
      
      This reverts the revert commit
      c7fc0e5d.
      7769030b
    • Craig Topper's avatar
      31059ba5
    • Sanjay Patel's avatar
      [SDAG] fold fsub -0.0, undef to undef rather than NaN · a253a2a7
      Sanjay Patel authored
      A question about this behavior came up on llvm-dev:
      http://lists.llvm.org/pipermail/llvm-dev/2020-February/139003.html
      ...and as part of backend improvements in D73978.
      
      We decided not to implement a more general change that would have
      folded any FP binop with nearly arbitrary constant + undef operand
      to undef because that is not theoretically correct (even if it is
      practically correct).
      
      This is the SDAG-equivalent to the IR change in D74713.
      a253a2a7
  2. Feb 23, 2020