Search in sources :

Example 1 with LoopFusion

use of claw.wani.transformation.ll.loop.LoopFusion in project claw-compiler by C2SM-RCM.

the class ClawTranslator method applyFusionClause.

/**
 * Generate loop fusion transformation if the clause is present in the
 * directive.
 *
 * @param claw    ClawPragma object that tells encapsulates all information
 *                about the current directives and its clauses.
 * @param xcodeml Current XcodeML program.
 * @param stmt    Statement on which the transformation is attached. Must be a
 *                FdoStatement for the loop fusion transformation.
 */
private void applyFusionClause(ClawPragma claw, XcodeProgram xcodeml, Xnode stmt) throws IllegalTransformationException {
    if (claw.hasClause(ClawClause.FUSION) && Xnode.isOfCode(stmt, Xcode.F_DO_STATEMENT)) {
        ClawPragma l = ClawPragma.createLoopFusionLanguage(claw);
        addTransformation(xcodeml, new LoopFusion(stmt, l));
        Message.debug(context(), "Loop fusion added: " + claw.value(ClawClause.GROUP));
    }
}
Also used : LoopFusion(claw.wani.transformation.ll.loop.LoopFusion) ClawPragma(claw.wani.language.ClawPragma)

Aggregations

ClawPragma (claw.wani.language.ClawPragma)1 LoopFusion (claw.wani.transformation.ll.loop.LoopFusion)1