[all-commits] [llvm/llvm-project] 19d11b: [flang] Allow "non-expandable" scalars in single-e...

Peter Klausler via All-commits all-commits at lists.llvm.org
Fri Sep 23 15:26:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 19d11b4d9de84137a50bf09e5180a53a007cacee
      https://github.com/llvm/llvm-project/commit/19d11b4d9de84137a50bf09e5180a53a007cacee
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-09-23 (Fri, 23 Sep 2022)

  Changed paths:
    M flang/include/flang/Evaluate/characteristics.h
    M flang/include/flang/Evaluate/shape.h
    M flang/include/flang/Evaluate/tools.h
    M flang/lib/Evaluate/fold-implementation.h
    M flang/lib/Evaluate/shape.cpp
    M flang/lib/Semantics/expression.cpp

  Log Message:
  -----------
  [flang] Allow "non-expandable" scalars in single-element contexts

When a scalar expression is not expandable -- i.e., it would have to be
evaluated once and saved in a temporary to avoid changing the semantics
of the program if it were to be evaluated more than once -- it affects
some aspects of folding and expression semantics.  In cases where
scalar expansion would not cause multiple evaluations due to the shape
of the result having but a single element, however, these "non-expandable"
scalar expressions can be safely allowed.

Differential Revision: https://reviews.llvm.org/D134476




More information about the All-commits mailing list