mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Reduce the number of dom queries made by GVN's conditional propagation
logic by half: isOnlyReachableViaThisEdge was trying to be clever and handle the case of a branch to a basic block which is contained in a loop. This costs a domtree lookup and is completely useless due to GVN's position in the pass pipeline: all loops have preheaders at this point, which means it is enough for isOnlyReachableViaThisEdge to check that Dst has only one predecessor. (I checked this theoretical argument by running over the entire nightly testsuite, and indeed it is so!). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149838 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -55,25 +55,6 @@ return: ; preds = %bb8
|
||||
}
|
||||
|
||||
declare void @foo(i1)
|
||||
|
||||
; CHECK: @test2
|
||||
define void @test2(i1 %x, i1 %y) {
|
||||
%z = or i1 %x, %y
|
||||
br i1 %z, label %true, label %false
|
||||
true:
|
||||
; CHECK: true:
|
||||
%z2 = or i1 %x, %y
|
||||
call void @foo(i1 %z2)
|
||||
; CHECK: call void @foo(i1 true)
|
||||
br label %true
|
||||
false:
|
||||
; CHECK: false:
|
||||
%z3 = or i1 %x, %y
|
||||
call void @foo(i1 %z3)
|
||||
; CHECK: call void @foo(i1 false)
|
||||
br label %false
|
||||
}
|
||||
|
||||
declare void @bar(i32)
|
||||
|
||||
; CHECK: @test3
|
||||
|
||||
Reference in New Issue
Block a user