1. Jan 20, 2023
  2. Jan 19, 2023
    • Yitzhak Mandelbaum's avatar
      [clang][dataflow] Fix bug in joining bool values. · daa316bc
      Yitzhak Mandelbaum authored
      Currently, the code assumes that all boolean-typed values are an instance of
      `BoolValue` (or its subclasses). Yet, lvalues violate this assumption. This
      patch drops the assumption and strengthens the check to confirm the shape of
      both values being joined.
      
      The patch also notes as FIXMES a number of problems discovered fixing this bug.
      
      Differential Revision: https://reviews.llvm.org/D141709
      daa316bc
    • Jean Perier's avatar
      [flang][hlfir] Lower whole allocatable or pointer component ref · 3508f691
      Jean Perier authored
      Compare to other component ref lowering, the hlfir.designate result type
      computation is different, and the allocatable/pointer/contiguous must
      be set on the hlfir.designate so that the component attributes are
      kept in the IR.
      
      Differential Revision: https://reviews.llvm.org/D142111
      3508f691
    • Nikita Popov's avatar
      [Local] Preserve noundef metadata in copyMetadataForLoad() · b3b049a8
      Nikita Popov authored
      If we're only changing the type of the load, preserve the noundef
      metadata.
      b3b049a8
    • Kelvin Li's avatar
      [flang] Add semantic check for multiple part-ref with non-zero rank · f13d6001
      Kelvin Li authored
      This patch is to diagnose the case when a type bound procedure is passed as an actual procedure argument.
      
         call sub0(t%t3%t2%t%info1)
      
      Fix: https://github.com/llvm/llvm-project/issues/55826
      
      Committed on behalf of DanielCChen
      
      Differential Revision: https://reviews.llvm.org/D141506
      f13d6001
    • Nikita Popov's avatar
      [InstCombine] Add test for load type conversion with !noundef (NFC) · 9c0f9572
      Nikita Popov authored
      The !noundef metadata is currently dropped.
      9c0f9572
    • David Green's avatar
      [AArch64] Armv9-A implies FP16 · ee700dec
      David Green authored
      As Armv9-a implies SVE2 it implies SVE (added in D141411) and so it
      should also imply FP16, which this patch adds. This helps get the target
      features correct when using `target("arch=armv9-a")` attributes.
      
      There is also an adjustment to AssertSameExtensionFlags in this patch to
      make it print cpu names, useful when the TargetParser unit tests are run
      through lit to distinguish which cpu is failing.
      
      Differential Revision: https://reviews.llvm.org/D142087
      ee700dec
    • Guilherme Valarini's avatar
      [OpenMP][Fix] Track all threads that may delete an entry · e0b3b6ce
      Guilherme Valarini authored
      The entries inside a "target data end" is processed in three steps:
      
        1. Query internal data maps for the entries and dispatch any necessary
           device-side operations (i.e., data retrieval);
        2. Synchronize the such operations;
        3. Update the host-side pointers and remove any entry which reference
           counter reached zero.
      
      Such steps may be executed by multiple threads which may even operate on
      the same entries. The current implementation (D121058) tries to
      synchronize these threads by tracking the "owner" for the deletion of
      each entry using their thread ID. Unfortunately it may failed to do so
      because of the following reasons:
      
        1. The owner is always assigned at the first step only if the
           reference count is 0 when the map is queried. This does not work
           when such owner thread is faster than a previous one that is also
           processing the same entry on another "target data end", leading to
           user-after-free problems.
        2. The entry is only added for post-processing (step 3) if its
           reference count was 0 at query time (step 1). This does not allow
           for threads to exchange responsibility for the deletion, leading
           again to user-after-free problems.
        3. An entry may appear multiple times in the arguments array of a
           "target data end", which may lead to deleting the entry
           prematurely, leading, again, to user-after-free problems.
      
      This patch addresses these problems by tracking all the threads that are
      using an entry at "target data end" region through a counter, ensuring
      only the last one deletes it when needed. It also ensures that all
      entries that are successfully found inside the data maps in step 1 are
      also processed in step 3, regardless if their reference count was zeroed
      or not at query time. This ensures the deletion ownership may be passed
      to any thread that is using such entry.
      
      Reviewed By: ye-luo
      
      Differential Revision: https://reviews.llvm.org/D132676
      e0b3b6ce
    • Ben Mudd's avatar
      [Dexter] Add on_line parameter to DexExpectStepOrder command · 03c45f14
      Ben Mudd authored
      DexExpectStepOrder uses the line to expect a debugger step from the actual line
      of the command in the Dexter source file. Now Dexter scripts have mainly moved
      to thier own script files instead of the actual source, there should be a
      option to override this behaviour to choose your own debugger step location.
      
      Reviewed By: Orlando
      
      Differential Revision: https://reviews.llvm.org/D142099
      03c45f14
    • Nikita Popov's avatar
      [InstCombine] Add non-logical variants for some ctpop and/or tests (NFC) · adcc90ae
      Nikita Popov authored
      And regenerate test checks to pick up new names.
      adcc90ae
    • Nikita Popov's avatar
      [InstCombine] Drop incorrect test (NFC) · 0c2630be
      Nikita Popov authored
      I made a typo here, this was supposed to be !align rather than
      !aligned. But then !align can only be applied to loads, not calls
      (where one would use the return attribute instead). And freeze
      can't be pushed through loads anyway, so there's no way to test
      this case (same as !nonnull).
      0c2630be
    • Yitzhak Mandelbaum's avatar
      [clang][dataflow] Add (initial) debug printing for `Value` and `Environment`. · c441f65f
      Yitzhak Mandelbaum authored
      Also adds uses of the new printing in analysis inner loop.
      
      Differential Revision: https://reviews.llvm.org/D141716
      c441f65f