Files
swift-mirror/lib/SILOptimizer/Transforms/CopyForwarding.cpp
Michael Gottesman 30accb058d [temp-immut-rv-forward] Handle open_existential_addr immutable_access.
Now we handle this case:

  %stack = alloc_stack $Protocol
  copy_addr %var to [initialization] %stack
  open_existential_addr immutable_access %stack
  ...
  destroy_addr %stack
  dealloc_stack %stack

We only do this if we have immutable_access. To be conservative I still only let
the normal whitelist of other instructions through.

I am adding this optimization since I am going to be eliminating a SILGen
peephole so I can enable SIL ownership verification everywhere.
2019-03-18 22:13:06 -07:00

66 KiB