Skip to content

Commit a757f23

Browse files
authored
[SimplifyCFG] Extend jump-threading to allow live local defs (#135079)
Extend jump-threading to allow local defs that are live outside of the threaded block. Allow threading to destinations where the local defs are not live. --------- Signed-off-by: John Lu <[email protected]>
1 parent f54e4b2 commit a757f23

File tree

6 files changed

+1037
-769
lines changed

6 files changed

+1037
-769
lines changed

clang/test/CodeGenObjC/exceptions.m

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,17 @@ void f4(void) {
144144
// CHECK-NEXT: br label
145145
// -> rethrow
146146

147-
// finally.call-exit: Predecessors are the @try and @catch fallthroughs
148-
// as well as the no-match case in the catch mechanism. The i1 is whether
149-
// to rethrow and should be true only in the last case.
150-
// CHECK: phi ptr
151-
// CHECK-NEXT: phi i1
152-
// CHECK-NEXT: call void @objc_exception_try_exit(ptr nonnull [[EXNDATA]])
147+
// finally.call-exit: Predecessor is the no-match case in the catch mechanism
148+
// which rethrows.
149+
// CHECK: call void @objc_exception_try_exit(ptr nonnull [[EXNDATA]])
153150
// CHECK-NEXT: call void @f4_help(i32 noundef 2)
154-
// CHECK-NEXT: br i1
155-
// -> ret, rethrow
151+
// CHECK-NEXT: br label
152+
// -> rethrow
156153

157-
// ret:
158-
// CHECK: ret void
154+
// finally.end.critedge: Predecessors are the @try and @catch fallthroughs.
155+
// CHECK: call void @objc_exception_try_exit(ptr nonnull [[EXNDATA]])
156+
// CHECK-NEXT: call void @f4_help(i32 noundef 2)
157+
// CHECK-NEXT: ret void
159158

160159
// Catch mechanism:
161160
// CHECK: call ptr @objc_exception_extract(ptr nonnull [[EXNDATA]])

0 commit comments

Comments
 (0)