Any packages/tools to automatically turn natural codes for matrix operations into pre-allocated forms?

For example, turn

F=D*(A+B*C)+E

into

G=copy(A)
mul!(G, B, C, true, true)
F=copy(E)
mul!(F, D, G, true, true)

Thanks.

2 Likes