Open-Turing-Project/OpenTuringCompiler — Issue #30: Optimize implicit array copies for function returns.
Author: trishume
Created: 2012-02-24 23:52:57+00:00
State: open
Labels: Quality

There are unnecessary array copies in function returns.

For example
```
fcn RetStr() : string
result "HI" % implicit copy to the sret buffer by result
end RetStr
var bob : string := RetStr() % copied again, sret buffer still around but unused
```

This could be optimized to pass the 'bob' buffer to RetStr instead of a special buffer.