stfc / PSyclone

Domain-specific compiler and code transformation system for Finite Difference/Volume/Element Earth-system models in Fortran
BSD 3-Clause "New" or "Revised" License
105 stars 28 forks source link

Support inlining in PSyAD #1881

Open rupertford opened 2 years ago

rupertford commented 2 years ago

We need to be able to inline some functions and calls in PSyAD to be able to deal with all kernels.

rupertford commented 2 years ago

created branch 1881_psyad_inlining

rupertford commented 2 years ago

At the moment we need to sort the following problems

1) functions are not encoded as calls in PSyIR. PR #1880 fixes this 2) the inline transformation does not inline function calls 3) the inline transformation does not appear to allow subroutines or functions to be outside of the same container 4) at least one of the routines being inlined uses an interface to support multiple precision :-( 5) not sure how to find the code. Need -d options in PSyAD as used in PSyclone?

rupertford commented 2 years ago
  1. External functions included via use statements may not be encoded as calls - not sure when and when not.
  2. If the function is in the same routine as the tl code then PSyAD complains about there being a function