It would be nice to be able to have several transformations set that are packaged in different jar file and being able to use the same CLAW Compiler infrastructure.
The configuration has been totally reviewed and the transformations are now belonging to a transformation set. The main configuration then describe which transformation set to use and specify the order of application.
The transformation set configuration file holds all information about the class, the type and the trigger of the transformation itself. This file also specify if an external JAR has to be loaded in order to load the transformation class.
The user can partially or totally overwrite the default configuration but not the transformation sets configurations. Those are distributed by the developers of the transformations.
Example of a transformation set configuration file:
<!--
This file describes CLAW internal transformation not triggered by the user.
-->
<transformations>
<transformation name="internal-xcodeml"
type="independent" trigger="translation_unit"
class="cx2x.translator.transformation.utility.XcodeMLWorkaround" />
<transformation name="openacc-continuation"
type="independent" trigger="directive"
class="cx2x.translator.transformation.openacc.OpenAccContinuation" />
</transformations>
Example of a the main default configuration file:
<!--
CLAW default configuration. This file should not be edited!
For more information about the configuration file and its extension, please
refer to the developer's guide
-->
<claw version="0.4">
<!-- Global transformation parameters -->
<global type="root">
<!-- Define the transformer to be used. -->
<parameter key="transformer" value="cx2x.translator.transformer.ClawTransformer" />
<!-- Default general values -->
<parameter key="default_target" value="gpu" />
<parameter key="default_directive" value="openacc" />
<!-- OpenACC default information -->
<!-- Define the default values to be used for the clauses. If value set to 0, compiler default value used. -->
<parameter key="openacc_vector_length" value="128" /> <!-- vector_length(128) -->
<parameter key="openacc_num_gangs" value="8" /> <!-- num_gangs(8) -->
<parameter key="openacc_num_workers" value="8" /> <!-- num_workers(8) -->
<!-- Specify the order of generation of clauses when nested loops are generated -->
<!-- possible values are vector_gang, gang_vector, vector, gang, none -->
<parameter key="openacc_execution_mode" value="vector_gang" />
</global>
<!-- Transformation sets -->
<sets>
<set name="claw-internal-set" />
<set name="claw-low-level-set" />
<set name="claw-high-level-set" />
</sets>
<!-- Transformation groups and order -->
<groups>
<group name="internal-xcodeml" />
<!-- Low-level transformations -->
<group name="remove" />
<group name="primitive" />
<group name="array-transform" />
<group name="loop-extract" />
<group name="loop-hoist" />
<group name="loop-fusion" />
<group name="loop-interchange" />
<group name="on-the-fly" />
<group name="kcache" />
<group name="if-extract" />
<!-- High-level transformations -->
<group name="parallelize" />
<group name="parallelize-forward" />
</groups>
</claw>
Example of a partial overwrite of the default configuration by a user defined configuration:
It would be nice to be able to have several transformations set that are packaged in different jar file and being able to use the same CLAW Compiler infrastructure.
The configuration has been totally reviewed and the transformations are now belonging to a
transformation set
. The main configuration then describe whichtransformation set
to use and specify the order of application.The
transformation set
configuration file holds all information about theclass
, thetype
and thetrigger
of the transformation itself. This file also specify if an external JAR has to be loaded in order to load the transformation class.The user can partially or totally overwrite the default configuration but not the transformation sets configurations. Those are distributed by the developers of the transformations.
Example of a transformation set configuration file:
Example of a the main default configuration file:
Example of a partial overwrite of the default configuration by a user defined configuration:
In this case, only the application order is overwritten.