mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
504eb62dfb
Summary: See D37528 for a previous (non-deferred) version of this patch and its description. Preserves dominance in a deferred manner using a new class DeferredDominance. This reduces the performance impact of updating the DominatorTree at every edge insertion and deletion. A user may call DDT->flush() within JumpThreading for an up-to-date DT. This patch currently has one flush() at the end of runImpl() to ensure DT is preserved across the pass. LVI is also preserved to help subsequent passes such as CorrelatedValuePropagation. LVI is simpler to maintain and is done immediately (not deferred). The code to perform the preversation was minimally altered and simply marked as preserved for the PassManager to be informed. This extends the analysis available to JumpThreading for future enhancements such as threading across loop headers. Reviewers: dberlin, kuhar, sebpop Reviewed By: kuhar, sebpop Subscribers: mgorny, dmgreen, kuba, rnk, rsmith, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D40146 llvm-svn: 322401
51 lines
807 B
LLVM
51 lines
807 B
LLVM
; RUN: opt -jump-threading -simplifycfg -S < %s | FileCheck %s
|
|
; CHECK-NOT: bb6:
|
|
; CHECK-NOT: bb7:
|
|
; CHECK-NOT: bb8:
|
|
; CHECK-NOT: bb11:
|
|
; CHECK-NOT: bb12:
|
|
; CHECK: bb:
|
|
; CHECK: bb2:
|
|
; CHECK: bb4:
|
|
; CHECK: bb10:
|
|
; CHECK: bb13:
|
|
declare void @ham()
|
|
|
|
define void @hoge() {
|
|
bb:
|
|
%tmp = and i32 undef, 1073741823
|
|
%tmp1 = icmp eq i32 %tmp, 2
|
|
br i1 %tmp1, label %bb12, label %bb2
|
|
|
|
bb2:
|
|
%tmp3 = icmp eq i32 %tmp, 3
|
|
br i1 %tmp3, label %bb13, label %bb4
|
|
|
|
bb4:
|
|
%tmp5 = icmp eq i32 %tmp, 5
|
|
br i1 %tmp5, label %bb6, label %bb7
|
|
|
|
bb6:
|
|
tail call void @ham()
|
|
br label %bb7
|
|
|
|
bb7:
|
|
br i1 %tmp3, label %bb13, label %bb8
|
|
|
|
bb8:
|
|
%tmp9 = icmp eq i32 %tmp, 4
|
|
br i1 %tmp9, label %bb13, label %bb10
|
|
|
|
bb10:
|
|
br i1 %tmp9, label %bb11, label %bb13
|
|
|
|
bb11:
|
|
br label %bb13
|
|
|
|
bb12:
|
|
br label %bb2
|
|
|
|
bb13:
|
|
ret void
|
|
}
|