File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
include/swift/SILOptimizer/Analysis Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,21 @@ bool pointsToLocalObject(SILValue V);
54
54
// / - an address projection based on an exclusive argument with no levels of
55
55
// / indirection (e.g. ref_element_addr, project_box, etc.).
56
56
inline bool isUniquelyIdentified (SILValue V) {
57
- return pointsToLocalObject (V)
58
- || (V->getType ().isAddress ()
59
- && isExclusiveArgument (getAccessedAddress (V)));
57
+ SILValue objectRef = V;
58
+ if (V->getType ().isAddress ()) {
59
+ auto storage = findAccessedStorage (V);
60
+ if (!storage)
61
+ return false ;
62
+
63
+ if (storage.isUniquelyIdentifiedAfterEnforcement ())
64
+ return true ;
65
+
66
+ if (!storage.isObjectAccess ())
67
+ return false ;
68
+
69
+ objectRef = storage.getObject ();
70
+ }
71
+ return pointsToLocalObject (objectRef);
60
72
}
61
73
62
74
enum class IsZeroKind {
You can’t perform that action at this time.
0 commit comments