1. Jul 04, 2023
    • Benjamin Kramer's avatar
      9846b9e2
    • Jay Foad's avatar
      [AMDGPU] Do not wait for vscnt on function entry and return · f2c164c8
      Jay Foad authored
      SIInsertWaitcnts inserts waitcnt instructions to resolve data
      dependencies. The GFX10+ vscnt (VMEM store count) counter is never used
      in this way. It is only used to resolve memory dependencies, and that is
      handled by SIMemoryLegalizer. Hence there is no need to conservatively
      wait for vscnt to be 0 on function entry and before returns.
      
      Differential Revision: https://reviews.llvm.org/D153537
      f2c164c8
    • Alexey Lapshin's avatar
      [DWARFLinker][NFC] Remove RangesTy &getValidAddressRanges(). · 8f5a68ab
      Alexey Lapshin authored
      This patch simplifies line table generation. It removes global
      array of all units ranges(RangesTy &getValidAddressRanges()).
      The comment says that global array of all units ranges is necessary
      to handle corner cases inside line table rows. Removing that
      special handling shows that its current usage is handling of
      "end of range case" which is already handled correctly
      (without special handling). .debug_line tables for clang binary
      built with and without this patch are equal.
      
      Differential Revision: https://reviews.llvm.org/D154288
      8f5a68ab
    • Jan Svoboda's avatar
      [clang][modules] Mark fewer identifiers as out-of-date · c68ba12a
      Jan Svoboda authored
      In `clang-scan-deps` contexts, the number of interesting identifiers in PCM files is fairly low (only macros), while the number of identifiers in the importing instance is high (builtins). Marking the whole identifier table out-of-date triggers lots of benign and expensive calls to `ASTReader::updateOutOfDateIdentifiers()`. (That unfortunately happens even for unused identifiers due to `SemaRef.IdResolver.begin(II)` line in `ASTWriter::WriteASTCore()`.)
      
      This patch makes the main code path more similar to C++ modules, where the PCM files have `INTERESTING_IDENTIFIERS` section which lists identifiers that get created in the identifier table of the importing instance and marked as out-of-date. The only difference is that the main code path doesn't *create* identifiers in the table and relies on the importing instance calling `ASTReader::get()` when creating new identifier on-demand. It only marks existing identifiers as out-of-date.
      
      This speeds up `clang-scan-deps` by 5-10%.
      
      Reviewed By: Bigcheese, benlangmuir
      
      Differential Revision: https://reviews.llvm.org/D151277
      c68ba12a
    • Florian Hahn's avatar
      [LSR] Move normalization check to normalizeForPostIncUse. · 7f5b15ad
      Florian Hahn authored
      Move the logic added in 3a57152d to normalizeForPostIncUse to catch
      additional un-invertable cases. This fixes another mis-compile pointed
      out by @peixin in D153004.
      7f5b15ad
    • LLVM GN Syncbot's avatar
      [gn build] Port d9d9be63 · 6d6f23af
      LLVM GN Syncbot authored
      6d6f23af
    • LLVM GN Syncbot's avatar
      [gn build] Port 2fd614ef · 39f327dc
      LLVM GN Syncbot authored
      39f327dc
    • Ivan Kosarev's avatar
      [AMDGPU][AsmParser][NFC] Remove an unused function. · 1ef47165
      Ivan Kosarev authored
      Was added in <https://reviews.llvm.org/D63293>, but never used.
      
      Reviewed By: foad
      
      Differential Revision: https://reviews.llvm.org/D154331
      1ef47165
    • Florian Hahn's avatar
      [LV] Move getBroadcastInstr to VPTransformState.::get (NFCI). · 39385c52
      Florian Hahn authored
      getBroadcastInstrs is only used in VPTransformState::get. Move it closer
      to use to reduce unnecessary interaction with ILV object.
      39385c52
    • Ties Stuij's avatar
    • Sam McCall's avatar
      [dataflow] Add dedicated representation of boolean formulas · 2fd614ef
      Sam McCall authored
      This is the first step in untangling the two current jobs of BoolValue.
      
      === Desired end-state: ===
      
      - BoolValue will model C++ booleans e.g. held in StorageLocations.
        this includes describing uncertainty (e.g. "top" is a Value concern)
      - Formula describes analysis-level assertions in terms of SAT atoms.
      
      These can still be linked together: a BoolValue may have a corresponding
      SAT atom which is constrained by formulas.
      
      === Done in this patch: ===
      
      BoolValue is left intact, Formula is just the input type to the
      SAT solver, and we build formulas as needed to invoke the solver.
      
      === Incidental changes to debug string printing: ===
      
      - variables renamed from B0 etc to V0 etc
        B0 collides with the names of basic blocks, which is confusing when
        debugging flow conditions.
      - debug printing of formulas (Formula and Atom) uses operator<<
        rather than debugString(), so works with gtest.
        Therefore moved out of DebugSupport.h
      - Did the same to Solver::Result, and some helper changes to SolverTest,
        so that we get useful messages on unit test failures
      - formulas are now printed as infix expressions on one line, rather than
        wrapped/indented S-exprs. My experience is that this is easier to scan
        FCs for small examples, and large ones are unreadable either way.
      - most of the several debugString() functions for constraints/results
        are unused, so removed them rather than updating tests.
        Inlined the one that was actually used into its callsite.
      
      Differential Revision: https://reviews.llvm.org/D153366
      2fd614ef
    • Ties Stuij's avatar
      [ARM] fix typo in large-stack.ll test · 61bcaae7
      Ties Stuij authored
      In llvm/test/CodeGen/ARM/large-stack.ll, the C in FileCheck wasn't
      uppercased. This wasn't spotted in development as MacOS's HFS+ fs is apparently
      often configured case-insensitive.
      61bcaae7
    • David Spickett's avatar
      [lldb][AArch64] Handle different default vector length in SVE testing · 9b37bfa1
      David Spickett authored
      This test previously ran on QEMU or A64FX both of which can/do have
      512 bit SVE by default.
      
      Graviton 3 has 256 bit SVE so the first part of the test failed.
      
      To fix this, probe the supported vector lengths before starting
      the test. The first check will use the default vector length and
      the rest use either 256 or 128 bit.
      
      Therefore this test will be skipped on a machine with only 128 bit SVE.
      
      Reviewed By: omjavaid
      
      Differential Revision: https://reviews.llvm.org/D154208
      9b37bfa1
    • David Spickett's avatar
      [lldb][AArch64] Fix tagged watch test on Graviton 3 · 8e76093a
      David Spickett authored
      During __do_global_dtors_aux glibc sets a flag that is right
      next to the global variable. This is done using a store byte.
      
      On QEMU the watchpoints are handled with a finer granularity
      than real hardware, so this wasn't a problem. On Graviton 3
      (and Mountain Jade, though this test won't run there) watchpoints
      look at larger chunks of memory.
      
      This means that the final continue actually stops in  __do_global_dtors_aux
      instead of exiting.
      
      We could fix this by padding the global to be away from the flag,
      but that is fiddly and it is easier just to remove the watchpoint
      before the final continue. We have already verified it worked by that
      point.
      
      Reviewed By: omjavaid
      
      Differential Revision: https://reviews.llvm.org/D154201
      8e76093a
    • David Spickett's avatar
      [lldb][AArch64] Account for extra libc frames in PAC unwind test · 518320fd
      David Spickett authored
      Running this on Amazon Ubuntu the final backtrace is:
      ```
      (lldb) thread backtrace
      * thread #1, name = 'a.out', stop reason = breakpoint 1.1
        * frame #0: 0x0000aaaaaaaa07d0 a.out`func_c at main.c:10:3
          frame #1: 0x0000aaaaaaaa07c4 a.out`func_b at main.c:14:3
          frame #2: 0x0000aaaaaaaa07b4 a.out`func_a at main.c:18:3
          frame #3: 0x0000aaaaaaaa07a4 a.out`main(argc=<unavailable>, argv=<unavailable>) at main.c:22:3
          frame #4: 0x0000fffff7b373fc libc.so.6`___lldb_unnamed_symbol2962 + 108
          frame #5: 0x0000fffff7b374cc libc.so.6`__libc_start_main + 152
          frame #6: 0x0000aaaaaaaa06b0 a.out`_start + 48
      ```
      This causes the test to fail because of the extra ___lldb_unnamed_symbol2962 frame
      (an inlined function?).
      
      To fix this, strictly check all the frames in main.c then for the rest
      just check we find __libc_start_main and _start in that order regardless
      of other frames in between.
      
      Reviewed By: omjavaid
      
      Differential Revision: https://reviews.llvm.org/D154204
      518320fd
    • Stephen Thomas's avatar
      [AMDGPU] Add functions for composing and decomposing S_WAIT_DEPCTR operands · 8aedad0f
      Stephen Thomas authored
      Add functions AMDGPU::DepCtr::encodeField*() and AMDGPU::DepCtr::decodeField*()
      for each of vm_vsrc, va_vdst and sa_sdst. These are now used in
      AMDGPUInsertDelayAlu and GCNHazardRecognizer so as to make working with
      S_WAITCNT_DEPCTR operands easier and more readable.
      
      Differential Revision: https://reviews.llvm.org/D154424
      8aedad0f
    • Evgeniy Brevnov's avatar
      [VPlan] Allow sinking of instructions with no defs · d7329653
      Evgeniy Brevnov authored
      We started seeing new failure after D142886. Looks like it enabled new cases and we hit an assert:
      assert(Current->getNumDefinedValues() == 1 &&
                 "only recipes with a single defined value expected");
      
       When we do instruction sinking for the first order recurrence we hit an assert if instruction doesn't have single def. In case instruction doesn't produce any new def there is no new users and nothing to sink.
      
      Reviewed By: fhahn
      
      Differential Revision: https://reviews.llvm.org/D151204
      d7329653
    • Ties Stuij's avatar
      [ARM] make execute only long call test checks more robust · 1f082d2d
      Ties Stuij authored
      Reviewed By: olista01
      
      Differential Revision: https://reviews.llvm.org/D154355
      1f082d2d
    • Harvin Iriawan's avatar
      [AArch64] Update SVE scheduling of some CPUs · d9d9be63
      Harvin Iriawan authored
        * Update cortex-a510 and neoverse-v2 SVE scheduling so that pseudos
      have the same instruction latency as original instruction.
      
        Differential Revision: https://reviews.llvm.org/D154084
      d9d9be63
    • Harvin Iriawan's avatar
      [AArch64] NFC : Change the way SVE pseudos are appended · c35d2071
      Harvin Iriawan authored
        * SVE pseudos don't pick up the right latency information during MI
          scheduling as the regex do not match with instruction name.
      
        * Move UNDEF, PSEUDO, and ZERO to the end of actual SVE instruction
      
        * Some CPUs *td files will be fixed in the next commit
      
          Differential Revision: https://reviews.llvm.org/D154232
      c35d2071
    • Ties Stuij's avatar
      [ARM] generate correct code for armv6-m XO big stack operations · 112d769e
      Ties Stuij authored
      The ARM backend codebase is dotted with places where armv6-m will generate
      constant pools. Now that we can generate execute-only code for armv6-m, we need
      to make sure we use the movs/lsls/adds/lsls/adds/lsls/adds pattern instead of
      these.
      
      Big stacks is one of the obvious places. In this patch we take care of two
      sites:
      1. take care of big stacks in prologue/epilogue
      2. take care of save/tSTRspi nodes, which implicitly fixes
         emitThumbRegPlusImmInReg which is used in several frame lowering fns
      
      Reviewed By: efriedma
      
      Differential Revision: https://reviews.llvm.org/D154233
      112d769e
    • Tom Eccles's avatar
      [flang][hlfir] fix elemental subroutine calls · 1538ad9f
      Tom Eccles authored
      genElementalCall can return a null option when lowering elemental
      subroutine calls (as there is no return value). Therefore
      std::option::value should not be used as it will cause an
      assertion failure.
      
      This fixes uses of the mvbits intrinsic with array arguments, as used in
      the gfortran test suite.
      
      Differential Revision: https://reviews.llvm.org/D154340
      1538ad9f
    • Tom Eccles's avatar
      [flang][hlfir] intrinsic dynamically optional arguments · 1b74fadd
      Tom Eccles authored
      This adds support for dynamically optional arguments for intrinsics
      which do not have their own hlfir operations.
      
      The functions for processing these arguments are mostly the same as the
      equivalent functions in ConvertExpr.cpp. I chose not to share
      implementations so that HLFIR helpers can be used here. Presumably
      ConvertExpr.cpp will go away one day.
      
      Depends on D154236
      
      Differential Revision: https://reviews.llvm.org/D154237
      1b74fadd
    • Tom Eccles's avatar
      [flang][hlfir] support optional args for intrinsic ops · be4518f2
      Tom Eccles authored
      This also adds support for allocatable non-optional arguments.
      
      Of the transformational intrinsics which currently have their own hlfir
      operations, all of the dynamically optional arguments are lowered as
      boxes, so that is all that is implemented for now.
      
      One alternative approach would have been to deal with the dynamically
      optional arguments when lowering to FIR runtime calls. I decided not to
      do this so that any passes working on the intrinsic operations would not
      have to know about and handle the dynamically optional arguments.
      
      Depends on D154235
      
      Differential Revision: https://reviews.llvm.org/D154236
      be4518f2
    • Tom Eccles's avatar
      [flang][hlfir][NFC] refactor transformational intrinsic lowering · d2d21301
      Tom Eccles authored
      The old code had overgrown itself and become difficult to read and
      modify. I've rewritten it and moved it into its own translation unit.
      
      I moved PreparedActualArgument to the header file for the
      transformational intrinsic lowering. Logically, it belongs in
      ConvertCall.h, but putting it there would create a circular dependency
      between HlfirIntrinsics and ConvertCall.
      
      Differential Revision: https://reviews.llvm.org/D154235
      d2d21301
    • Igor Kirillov's avatar
      [CodeGen] Precommit tests for D153355 · e13582e9
      Igor Kirillov authored
      Differential Revision: https://reviews.llvm.org/D153856
      e13582e9
  2. Jul 03, 2023
  3. Jul 04, 2023
  4. Jul 03, 2023
  5. Jul 04, 2023