@@ -985,24 +985,6 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
985
985
return InstNumbers[a] < InstNumbers[b];
986
986
}
987
987
988
- // FIXME: For sanity, address-type phis should be prohibited at all SIL
989
- // stages. However, the optimizer currently breaks the invariant in three
990
- // places:
991
- // 1. Normal Simplify CFG during conditional branch simplification
992
- // (sneaky jump threading).
993
- // 2. Simplify CFG via Jump Threading.
994
- // 3. Loop Rotation.
995
- //
996
- // BasicBlockCloner::canCloneInstruction and sinkAddressProjections is
997
- // designed to avoid this issue, we just need to make sure all passes use it
998
- // correctly.
999
- //
1000
- // Minimally, we must prevent address-type phis as long as access markers are
1001
- // preserved. A goal is to preserve access markers in OSSA.
1002
- bool prohibitAddressPhis () {
1003
- return F.hasOwnership ();
1004
- }
1005
-
1006
988
void visitSILPhiArgument (SILPhiArgument *arg) {
1007
989
// Verify that the `isPhiArgument` property is sound:
1008
990
// - Phi arguments come from branches.
@@ -1026,7 +1008,7 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
1026
1008
" All phi argument inputs must be from branches." );
1027
1009
}
1028
1010
}
1029
- if (arg->isPhi () && prohibitAddressPhis () ) {
1011
+ if (arg->isPhi ()) {
1030
1012
// As a property of well-formed SIL, we disallow address-type
1031
1013
// phis. Supporting them would prevent reliably reasoning about the
1032
1014
// underlying storage of memory access. This reasoning is important for
0 commit comments