We've previously discussed (e.g. in #8002) that TypeSSA no longer works well now that we automatically refine reference types to be exact wherever possible. The fix we had previously discussed was finishing and using the TypeGeneralizing pass (which might separately be good for code size by reducing the size of the type section) to remove exactness. But we could alternatively have a more crude fix where TypeSSA itself could delete exactness from as many types as possible. The only types for which it would not be able to erase exactness would be descriptor types that may flow into struct.new_desc instructions and any type that appears in an exact reference in a public heap type.
We've previously discussed (e.g. in #8002) that TypeSSA no longer works well now that we automatically refine reference types to be exact wherever possible. The fix we had previously discussed was finishing and using the
TypeGeneralizingpass (which might separately be good for code size by reducing the size of the type section) to remove exactness. But we could alternatively have a more crude fix where TypeSSA itself could delete exactness from as many types as possible. The only types for which it would not be able to erase exactness would be descriptor types that may flow intostruct.new_descinstructions and any type that appears in an exact reference in a public heap type.