Avoid generation of temporaries

This PR prevents the code generator from emitting useless temporaries