Hello,
It looks that I could finally figure out why the hell every type conversion was done involving an intermediate temp.
This happened because node processing order was a bit incorrect. See the attached patch. Since argument of firstpass is passed by reference, freeing the old node before firstpassing the new one actually causes the tree contain an invalid pointer for the duration of firstpassing that new node.
In case of string type conversion, the typeconvn was replaced by a calln, but that calln never optimized its return location because it failed the test "if aktassignmentnode.right=self"; aktassignmentnode.right was still equal to the typeconvn.
The patch has great effect on generated code in general and on low-level RTL stuff in particular.
Regards,
Sergei
