====== MANET Actions ====== This page presents the set of actions that one can perform over a selected join point. These actions will transform the source code and have two main goals. They can be used to improve the performance of the application or they can change the program so that we have a normalized representation that is easier to analyze. ^ Action ^ Parameters ^^ Target Join Point ^ Description ^ | ::: ^ Type ^ Description | ::: | ::: | | Clone | String | The new name. | function | Clones the function and assigns the clone a new name. | | Interchange | loop | The other loop. | loop | Performs Loop Interchange on the selected loop and the loop passed as argument. | | Tile | Integer | The block size. | loop | Performs Loop Tiling on the selected loop. | | Unroll | Integer | The unroll factor. | loop | Performs Loop Unroll on the selected loop. If the unroll factor passed as argument is **0**, the loop will be fully unrolled. To apply this action, it must be possible to calculate the number of iterations. If the unroll factor is not a divisor of the number of iterations, an epilogue //FOR// loop will be used to iterate over the remainder of the iterations. | | UnrollAndJam | Integer | The unroll factor. | loop | Performs Loop Unroll and Jam on the selected loop. **This is still and experimental implementation.** Three conditions must be met in order for this transformation to be applied: **1)** the loops need to be perfectly nested, **2)** it must be possible to calculate the iteration count and **3)** the unroll factor must be a divisor of the iteration count. | ||||| | SingleDeclarator | n.a. | n.a. | program | Changes the code of every function so that each declaration has at most one declarator. For instance, ''int a, b, c;'' becomes ''int a; int b; int c;''. | | AssignmentExpansion | n.a. | n.a. | program | Assignment expressions that use augmented assignment operators are "expanded" and use the normal assignment operator. For instance, ''sum += a[i];'' becomes ''sum = sum + a[i];''. | | UnaryExpansion | n.a. | n.a. | program | Unary expressions with increments or decrements are "expanded" safely and use a normal assignment operator. We only apply this transformation when we are sure that the evaluation order is not relevant, i.e., when it does not matter if the operator is prefix or postifx. For instance, ''for(i=0; i