@@ -1065,24 +1065,6 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
1065
1065
return InstNumbers[a] < InstNumbers[b];
1066
1066
}
1067
1067
1068
- // FIXME: For sanity, address-type phis should be prohibited at all SIL
1069
- // stages. However, the optimizer currently breaks the invariant in three
1070
- // places:
1071
- // 1. Normal Simplify CFG during conditional branch simplification
1072
- // (sneaky jump threading).
1073
- // 2. Simplify CFG via Jump Threading.
1074
- // 3. Loop Rotation.
1075
- //
1076
- // BasicBlockCloner::canCloneInstruction and sinkAddressProjections is
1077
- // designed to avoid this issue, we just need to make sure all passes use it
1078
- // correctly.
1079
- //
1080
- // Minimally, we must prevent address-type phis as long as access markers are
1081
- // preserved. A goal is to preserve access markers in OSSA.
1082
- bool prohibitAddressPhis () {
1083
- return F.hasOwnership ();
1084
- }
1085
-
1086
1068
void visitSILPhiArgument (SILPhiArgument *arg) {
1087
1069
// Verify that the `isPhiArgument` property is sound:
1088
1070
// - Phi arguments come from branches.
@@ -1106,7 +1088,7 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
1106
1088
" All phi argument inputs must be from branches." );
1107
1089
}
1108
1090
}
1109
- if (arg->isPhi () && prohibitAddressPhis () ) {
1091
+ if (arg->isPhi ()) {
1110
1092
// As a property of well-formed SIL, we disallow address-type
1111
1093
// phis. Supporting them would prevent reliably reasoning about the
1112
1094
// underlying storage of memory access. This reasoning is important for
0 commit comments