summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-02-02 03:57:13 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-02-02 03:57:13 +0000
commita4499e9f73f10b2f29dc2d104ab6b3dc0df16d8c (patch)
tree6f852c50ef5d38380242352e5caf938cc96d7f9e /llvm/test
parentd08778badecebddfaa86aac528b48bcd74ce4eaa (diff)
downloadbcm5719-llvm-a4499e9f73f10b2f29dc2d104ab6b3dc0df16d8c.tar.gz
bcm5719-llvm-a4499e9f73f10b2f29dc2d104ab6b3dc0df16d8c.zip
[LCG] Build an edge abstraction for the LazyCallGraph and use it to
differentiate between indirect references to functions an direct calls. This doesn't do a whole lot yet other than change the print out produced by the analysis, but it lays the groundwork for a very major change I'm working on next: teaching the call graph to actually be a call graph, modeling *both* the indirect reference graph and the call graph simultaneously. More details on that in the next patch though. The rest of this is essentially a bunch of over-engineering that won't be interesting until the next patch. But this also isolates essentially all of the churn necessary to introduce the edge abstraction from the very important behavior change necessary in order to separately model the two graphs. So it should make review of the subsequent patch a bit easier at the cost of making this patch seem poorly motivated. ;] Differential Revision: http://reviews.llvm.org/D16038 llvm-svn: 259463
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Analysis/LazyCallGraph/basic.ll54
-rw-r--r--llvm/test/Analysis/LazyCallGraph/non-leaf-intrinsics.ll4
2 files changed, 29 insertions, 29 deletions
diff --git a/llvm/test/Analysis/LazyCallGraph/basic.ll b/llvm/test/Analysis/LazyCallGraph/basic.ll
index fce453bc15d..418559578b4 100644
--- a/llvm/test/Analysis/LazyCallGraph/basic.ll
+++ b/llvm/test/Analysis/LazyCallGraph/basic.ll
@@ -3,7 +3,7 @@
; Basic validation of the call graph analysis used in the new pass manager.
define void @f() {
-; CHECK-LABEL: Call edges in function: f
+; CHECK-LABEL: Edges in function: f
; CHECK-NOT: ->
entry:
@@ -51,8 +51,8 @@ define void @f12() {
declare i32 @__gxx_personality_v0(...)
define void @test0() {
-; CHECK-LABEL: Call edges in function: test0
-; CHECK-NEXT: -> f
+; CHECK-LABEL: Edges in function: test0
+; CHECK-NEXT: call -> f
; CHECK-NOT: ->
entry:
@@ -64,19 +64,19 @@ entry:
}
define void ()* @test1(void ()** %x) personality i32 (...)* @__gxx_personality_v0 {
-; CHECK-LABEL: Call edges in function: test1
-; CHECK-NEXT: -> f12
-; CHECK-NEXT: -> f11
-; CHECK-NEXT: -> f10
-; CHECK-NEXT: -> f7
-; CHECK-NEXT: -> f9
-; CHECK-NEXT: -> f8
-; CHECK-NEXT: -> f6
-; CHECK-NEXT: -> f5
-; CHECK-NEXT: -> f4
-; CHECK-NEXT: -> f3
-; CHECK-NEXT: -> f2
-; CHECK-NEXT: -> f1
+; CHECK-LABEL: Edges in function: test1
+; CHECK-NEXT: call -> f6
+; CHECK-NEXT: call -> f10
+; CHECK-NEXT: ref -> f12
+; CHECK-NEXT: ref -> f11
+; CHECK-NEXT: ref -> f7
+; CHECK-NEXT: ref -> f9
+; CHECK-NEXT: ref -> f8
+; CHECK-NEXT: ref -> f5
+; CHECK-NEXT: ref -> f4
+; CHECK-NEXT: ref -> f3
+; CHECK-NEXT: ref -> f2
+; CHECK-NEXT: ref -> f1
; CHECK-NOT: ->
entry:
@@ -108,14 +108,14 @@ unwind:
@h = constant void ()* @f7
define void @test2() {
-; CHECK-LABEL: Call edges in function: test2
-; CHECK-NEXT: -> f7
-; CHECK-NEXT: -> f6
-; CHECK-NEXT: -> f5
-; CHECK-NEXT: -> f4
-; CHECK-NEXT: -> f3
-; CHECK-NEXT: -> f2
-; CHECK-NEXT: -> f1
+; CHECK-LABEL: Edges in function: test2
+; CHECK-NEXT: ref -> f7
+; CHECK-NEXT: ref -> f6
+; CHECK-NEXT: ref -> f5
+; CHECK-NEXT: ref -> f4
+; CHECK-NEXT: ref -> f3
+; CHECK-NEXT: ref -> f2
+; CHECK-NEXT: ref -> f1
; CHECK-NOT: ->
load i8*, i8** bitcast (void ()** @g to i8**)
@@ -152,13 +152,13 @@ define void @test2() {
; CHECK-NEXT: test2
;
; CHECK-LABEL: SCC with 1 functions:
-; CHECK-NEXT: f12
+; CHECK-NEXT: f10
;
; CHECK-LABEL: SCC with 1 functions:
-; CHECK-NEXT: f11
+; CHECK-NEXT: f12
;
; CHECK-LABEL: SCC with 1 functions:
-; CHECK-NEXT: f10
+; CHECK-NEXT: f11
;
; CHECK-LABEL: SCC with 1 functions:
; CHECK-NEXT: f9
diff --git a/llvm/test/Analysis/LazyCallGraph/non-leaf-intrinsics.ll b/llvm/test/Analysis/LazyCallGraph/non-leaf-intrinsics.ll
index 89a21e542f7..ce6d63b7aff 100644
--- a/llvm/test/Analysis/LazyCallGraph/non-leaf-intrinsics.ll
+++ b/llvm/test/Analysis/LazyCallGraph/non-leaf-intrinsics.ll
@@ -8,7 +8,7 @@ define private void @f() {
}
define void @calls_statepoint(i8 addrspace(1)* %arg) gc "statepoint-example" {
-; CHECK: Call edges in function: calls_statepoint
+; CHECK: Edges in function: calls_statepoint
; CHECK-NEXT: -> f
entry:
%cast = bitcast i8 addrspace(1)* %arg to i64 addrspace(1)*
@@ -17,7 +17,7 @@ entry:
}
define void @calls_patchpoint() {
-; CHECK: Call edges in function: calls_patchpoint
+; CHECK: Edges in function: calls_patchpoint
; CHECK-NEXT: -> f
entry:
%c = bitcast void()* @f to i8*
OpenPOWER on IntegriCloud