[all-commits] [llvm/llvm-project] c336e7: [flang] Fix function result rewrite for CPTR type

PeixinQiao via All-commits all-commits at lists.llvm.org
Tue Nov 8 17:26:02 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c336e72c82b11732f1728ab2f608ed99c7843258
      https://github.com/llvm/llvm-project/commit/c336e72c82b11732f1728ab2f608ed99c7843258
  Author: Peixin-Qiao <qiaopeixin at huawei.com>
  Date:   2022-11-09 (Wed, 09 Nov 2022)

  Changed paths:
    M flang/lib/Optimizer/Dialect/FIRType.cpp
    M flang/lib/Optimizer/Transforms/AbstractResult.cpp
    M flang/test/Fir/abstract-results.fir

  Log Message:
  -----------
  [flang] Fix function result rewrite for CPTR type

Not all derived type can be taken as abstract result. The CPTR type
should be treated as return by value so to interoperable with C
functions. Fix the function result rewrite for CPTR type, but it
should be generalized for all derived types. The ABI of
interoperability with C for derived type is architecture dependent,
which should be supported later.

Reviewed By: PeteSteinfeld, jeanPerier

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




More information about the All-commits mailing list