Commit Graph

1 Commits

Author SHA1 Message Date
Erik Eckstein
9f85cb8576 TempRValueElimination: handle potential modifications of the copy-source in a called functions correctly.
This fixes a miscompile in case the source of the optimized copy_addr is modified in a called function with to a not visible alias.
This can happen with class properties or global variables.

This fix removes the special handling of function parameters, which was just wrong.
Instead it simply uses the alias analysis API to check for modifications of the source object.

The fix makes TempRValueElimination more conservative and this can cause some performance regressions, but this is unavoidable.

rdar://problem/69605657
2020-10-09 20:54:59 +02:00