Someone on the team at Apple was actually exploring this idea years ago (or, well, something similar). We came to the conclusion that…it doesn't actually do anything if everybody is following the ARC rules:
if you statically know someone else is holding on to a value for you, you only need to do your own retaining if it's (possibly) going to outlive the current borrow, such as assigning to a property or calling a function that accepts an owned value
if you statically know that someone else has given you an owned value, the same thing is true, except you're responsible for doing one release at the end
Swift today says "you are always in one of these two scenarios". Adding this kind of run-time tracking would allow for a third one: "the value you're given might be owned or it might be borrowed". This turns out to be the worst of both cases from a complexity perspective! Now you only have the guarantees of a borrowed value, but you still have to try to release it when you're done with it.
Now, the optimizer has fallen short of those two bullet points in Swift's history, doing more retains and releases than are strictly necessary. Separate compilation makes this tricky too: if a function takes an argument as owned but only benefits from that on one branch, the caller still has to do a retain even if they wouldn't end up on that branch. And most of the time Swift developers don't manually choose owned and borrowed, because it's still relatively new and the defaults are usually good enough (but not always!). So I can't say a scheme like this is never beneficial—it'd be good for some programs and less good for others. But it is less transformative than it seems at first glance.
That's the point of the optimization here, trying to release becomes releasing and that is just a bit check, instead of receiving an owned value which will involve an RC when releasing. A bit check is cheaper than the RC.
All the insertions is done by the compiler, none would be seen by the programmer.
Since it would break the ABI, on that case it is irrelevant since all value should follow the tag convention in order to work.