-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpresent.py
More file actions
26 lines (21 loc) · 748 Bytes
/
present.py
File metadata and controls
26 lines (21 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from loki import (
Sourcefile, FindNodes, CallStatement,
Transformer, Dimension, ir,
Scalar, Assignment, fgen,
FindVariables, symbols, demote_variables,
Intrinsic, Variable, SymbolAttributes,
DerivedType, VariableDeclaration, flatten,
BasicType, SubstituteExpressions,
FindExpressions, FindInlineCalls
)
from loki.transform import inline_member_procedures
from loki import analyse_dataflow
file="present.F90"
source=Sourcefile.from_file(file, preprocess=False)
#source=Sourcefile.from_file(file, preprocess=True)
routine=source["CALLER"]
print(routine.members)
#routine.enrich_calls(routine.members)
inline_member_procedures(routine)
print("*************** INLINE ECMWF ***************")
print(fgen(routine))