public class LoopHoist extends ClawBlockTransformation
_clawEnd, _clawStart
Constructor and Description |
---|
LoopHoist(ClawPragma startDirective,
ClawPragma endDirective)
Constructs a new LoopHoist triggered from a specific directive.
|
Modifier and Type | Method and Description |
---|---|
boolean |
analyze(XcodeProgram xcodeml,
Translator translator)
Analyze the possibility to apply the transformation.
|
boolean |
canBeTransformedWith(XcodeProgram xcodeml,
Transformation transformation)
Check whether the current transformation can be transformed together with
the given transformation.
|
void |
transform(XcodeProgram xcodeml,
Translator translator,
Transformation transformation)
Apply the actual transformation.
|
removePragma
getEndDirective
abortOnFailedAnalysis, getDirective, getStartLine, isTransformed, setStartLine, transformed
public LoopHoist(ClawPragma startDirective, ClawPragma endDirective)
startDirective
- The directive that triggered the loop hoist
transformation.endDirective
- The directive that end the structured block.public boolean analyze(XcodeProgram xcodeml, Translator translator)
Transformation
analyze
in class Transformation
xcodeml
- The XcodeML on which the transformations are applied.translator
- The translator used to applied the transformations.Transformation.analyze(XcodeProgram, Translator)
public boolean canBeTransformedWith(XcodeProgram xcodeml, Transformation transformation)
Transformation
canBeTransformedWith
in class Transformation
xcodeml
- The XcodeML on which the transformations are applied.transformation
- The other transformation part of the dependent transformation.Transformation.canBeTransformedWith(XcodeProgram, Transformation)
public void transform(XcodeProgram xcodeml, Translator translator, Transformation transformation) throws java.lang.Exception
Transformation
transform
in class Transformation
xcodeml
- The XcodeML on which the transformations are applied.translator
- The translator used to applied the transformations.transformation
- Only for dependent transformation. The other
transformation part of the transformation.IllegalTransformationException
- if the transformation cannot be
applied.java.lang.Exception
Transformation.transform(XcodeProgram, Translator, Transformation)