Juan C Rodriguez

Results 28 issues of Juan C Rodriguez

Actually, the `opt_loop_invariant` considers only full expressions, it is not working on subexpressions, for instance, the code: ```r while (i < n) { i

enhancement

Actually, the `opt_loop_invariant` does not consider `if/else` expressions to move. In this sense, the code: ```r while (i < n) { if (n > 3) { something_without_i } } ```...

enhancement

Eliminate all those variables that are assigned, read or not, but that do not affect the value returned by the function. For example: ```r foo

enhancement

For example, when `opt_constant_propagation` finds a function call, it deletes the previously found constant-assigned values. This is mainly done to avoid having ```r x

enhancement

The R parser has left associativity, so `x + 10 + 200` is `((x + 10) + 200)`. So this is not being folded to `x + 210`. If we...

enhancement

For example: fold `0 * x` to `0` However, this could change code semantics, in the second case, if x does not exist then the code would not throw an...

enhancement

If the optimizer knows which functions modify their parent env, then function calls won’t abort optimization.

enhancement

This can have an issue if the common function call returns random values. For example: ```r a

enhancement

Dead Expression Elimination is optimizing the code: ```r code

bug

The `opt_dead_code` optimizer could also implement empty if/else and loops eliminations. For instance: ```r if (condition) { } else { some_code } while (condition) { } ``` Could be optimized...

enhancement