-
Notifications
You must be signed in to change notification settings - Fork 31
(#Towards 2302) intrinsic argument names #3150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
7af3005
5dd0720
0a371ca
3956c10
fed2ccc
19a5877
8f3250f
808aa34
4533878
808ad04
893de29
c856f7c
976b254
befe4fa
a36b037
b6879e0
ba7a2cf
f5bce2b
3d910e7
a0d5fa6
fa98da6
a06be59
bad2aff
7dcdcbf
b530cdc
18ab68e
e00e779
36426fb
a8c13b6
67a161b
755956e
d91c9cc
4c42db1
38b267b
a1c480d
ab0225e
8621281
c04f77a
30af84f
f40f5eb
9fff0bd
fbf5002
77cf8a6
75c2e84
2301919
1021c06
99ff7b0
ce27a54
33ddc80
2bbdbc0
eba7d1e
e6276e6
fcc9892
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,16 +50,17 @@ by the command: | |
|
|
||
| .. parsed-literal:: | ||
|
|
||
|
|
||
| > psyclone -h | ||
| usage: psyclone [-h] [-v] [-c CONFIG] [-s SCRIPT] [--enable-cache] [-l {off,all,output}] | ||
| [-p {invokes,routines,kernels}] | ||
| [--backend {disable-validation,disable-indentation}] [-o OUTPUT_FILE] | ||
| [-api DSL] [-oalg OUTPUT_ALGORITHM_FILE] [-opsy OUTPUT_PSY_FILE] | ||
| [-o OUTPUT_FILE] [-api DSL] [-oalg OUTPUT_ALGORITHM_FILE] [-opsy OUTPUT_PSY_FILE] | ||
| [-okern OUTPUT_KERNEL_PATH] [-dm] [-nodm] | ||
| [--kernel-renaming {multiple,single}] | ||
| [--log-level {OFF,DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--log-file LOG_FILE] | ||
| [--keep-comments] [--keep-directives] [-I INCLUDE] [-d DIRECTORY] | ||
| [--modman-file-ignore IGNORE_PATTERN] [--free-form | --fixed-form] | ||
| [--backend {disable-validation,disable-indentation}] [--disable-named-intrinsic-args] | ||
| filename | ||
|
|
||
| Transform a file using the PSyclone source-to-source Fortran compiler | ||
|
|
@@ -83,11 +84,6 @@ by the command: | |
| to apply line-length limit to output Fortran only. | ||
| -p {invokes,routines,kernels}, --profile {invokes,routines,kernels} | ||
| add profiling hooks for 'kernels', 'invokes' or 'routines' | ||
| --backend {disable-validation,disable-indentation} | ||
| options to control the PSyIR backend used for code generation. Use | ||
| 'disable-validation' to disable the validation checks that are | ||
| performed by default. Use 'disable-indentation' to turn off all | ||
| indentation in the generated code. | ||
| -o OUTPUT_FILE (code-transformation mode) output file | ||
| -api DSL, --psykal-dsl DSL | ||
| whether to use a PSyKAl DSL (one of ['lfric', 'gocean']) | ||
|
|
@@ -123,6 +119,18 @@ by the command: | |
| --modman-file-ignore IGNORE_PATTERN | ||
| Ignore files that contain the specified pattern. | ||
|
|
||
| Fortran backend control options.: | ||
| These settings control how PSyclone outputs Fortran. | ||
|
|
||
| --backend {disable-validation,disable-indentation} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only remaining sticking point. I'm not keen on having two different forms for backend options. Since we now have a nice group, we probably don't need the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no problem in moving them to independent flags grouped in the help. But I prefer "backend" rather than the abbreviations. Also "disable-named-intrinsic-args" seems like we are disabling some intrinsics, I would call it "--backend-omit-unneeded-intrinsic-arg-names" (or something shorter if the intent is clear)
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I'm happy with those names, I'll fix those.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| options to control the PSyIR backend used for code generation. | ||
| Use 'disable-validation' to disable the validation checks that are performed by | ||
| default. Use 'disable-indentation' to turn off all indentation in the generated code. | ||
| --disable-named-intrinsic-args | ||
| By default, the backend names any required arguments to intrinsic calls. This option | ||
| disables this feature (in case the processed code has overridden a Fortran intrinsic), | ||
| i.e. SUM(arr, mask=maskarr) instead of SUM(array=arr, mask=maskarr). | ||
|
|
||
| Basic Use | ||
| --------- | ||
|
|
||
|
|
@@ -317,6 +325,15 @@ The default behaviour may be changed by adding the | |
| :ref:`configuration file <config-default-section>`. Note that any | ||
| command-line setting always takes precedence. | ||
|
|
||
| Overriding Fortran Intrinsics | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| PSyclone attempts to canonicalise Fortran Intrinsics, which involves adding | ||
| argument names to each argument in the ``IntrinsicCall`` PSyIR node. This can | ||
| cause problems with code that overrides Fortran intrinsics. To ensure correct | ||
| behaviour of the output, the ``--disable-named-intrinsic-args`` option must | ||
| be passed to PSyclone, else the resultant code may not compile or run correctly. | ||
|
|
||
| Automatic Profiling Instrumentation | ||
| ----------------------------------- | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this is a leftover?
I think it would be more interesting to know what it will do, e.g. "PSyclone will produce and error" or "will create a CodeBlock"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, clarified.