[all-commits] [llvm/llvm-project] 925d34: [flang] fix IsSimplyContiguous with expressions (#...

jeanPerier via All-commits all-commits at lists.llvm.org
Wed Feb 5 08:20:58 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 925d347c5a43fd4864c7cb142e4069a1d494cd11
      https://github.com/llvm/llvm-project/commit/925d347c5a43fd4864c7cb142e4069a1d494cd11
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2025-02-05 (Wed, 05 Feb 2025)

  Changed paths:
    M flang/include/flang/Evaluate/check-expression.h
    M flang/include/flang/Evaluate/tools.h
    M flang/lib/Evaluate/check-expression.cpp
    M flang/lib/Lower/ConvertCall.cpp
    M flang/lib/Lower/ConvertExprToHLFIR.cpp
    M flang/test/Evaluate/folding09.f90
    A flang/test/Lower/HLFIR/call-issue-124043.f90
    M flang/test/Lower/HLFIR/calls-constant-expr-arg.f90

  Log Message:
  -----------
  [flang] fix IsSimplyContiguous with expressions (#125708)

IsSymplyContiguous was visiting expressions and returning false on
expressions like `x(::2) + y`, which triggered an assert in lowering
when preparing arguments for copy-in/out.

Update it to return false for everything that is not a variable, except
when provided a flag to treat PARAMETER bases as variables. This flags
is required for internal usages in lowering where lowering needs to now
if the read-only memory is being addressed contiguously or not.

Update call lowering to always copy parameter array section into
contiguous writable memory when passing them. The rational here is that
copy-out generated in nested calls using the dummy arguments will cause
a segfault.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list