summaryrefslogtreecommitdiffstats
path: root/llvm/test/Other/time-passes.ll
diff options
context:
space:
mode:
authorFedor Sergeev <fedor.sergeev@azul.com>2018-09-04 06:12:28 +0000
committerFedor Sergeev <fedor.sergeev@azul.com>2018-09-04 06:12:28 +0000
commitf2d4372e0e660720bbe4d1d266da2cf783868666 (patch)
tree35be2cf36a0495319d949434bb7ab39565151f66 /llvm/test/Other/time-passes.ll
parent2cbba5633753552a984572c8b9a5997e5c96496d (diff)
[PassTiming] reporting time-passes separately for multiple pass instances of the same pass
Summary: Refactoring done by rL340872 accidentally appeared to be non-NFC, changing the way how multiple instances of the same pass are handled - aggregation of results by PassName forced data for multiple instances to be merged together and reported as one line. Getting back to creating/reporting timers per pass instance. Reporting was a bit enhanced by counting pass instances and adding #<num> suffix to the pass description. Note that it is instances that are being counted, not invocations of them. time-passes test updated to account for multiple passes being run. Reviewers: paquette, jhenderson, MatzeB, skatkov Reviewed By: skatkov Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51535 llvm-svn: 341346
Diffstat (limited to 'llvm/test/Other/time-passes.ll')
-rw-r--r--llvm/test/Other/time-passes.ll26
1 files changed, 25 insertions, 1 deletions
diff --git a/llvm/test/Other/time-passes.ll b/llvm/test/Other/time-passes.ll
index b8322ed1394c..b53c28485d84 100644
--- a/llvm/test/Other/time-passes.ll
+++ b/llvm/test/Other/time-passes.ll
@@ -1,9 +1,18 @@
-; RUN: opt < %s -disable-output -instcombine -time-passes 2>&1 | FileCheck %s --check-prefix=TIME --check-prefix=TIME-LEGACY
+; RUN: opt < %s -disable-output -instcombine -instcombine -licm -time-passes 2>&1 | FileCheck %s --check-prefix=TIME --check-prefix=TIME-LEGACY
+; RUN: opt < %s -disable-output -instcombine -instcombine -licm -licm -time-passes 2>&1 | FileCheck %s --check-prefix=TIME --check-prefix=TIME-LEGACY --check-prefix=TIME-DOUBLE-LICM
;
; TIME: Pass execution timing report
; TIME: Total Execution Time:
; TIME: Name
; TIME-LEGACY-DAG: Combine redundant instructions
+; TIME-LEGACY-DAG: Combine redundant instructions #2
+; TIME-LEGACY-DAG: Loop Invariant Code Motion
+; TIME-DOUBLE-LICM-DAG: Loop Invariant Code Motion #2
+; TIME-LEGACY-DAG: Scalar Evolution Analysis
+; TIME-LEGACY-DAG: Loop-Closed SSA Form Pass
+; TIME-LEGACY-DAG: LCSSA Verifier
+; TIME-LEGACY-DAG: Canonicalize natural loops
+; TIME-LEGACY-DAG: Natural Loop Information
; TIME-LEGACY-DAG: Dominator Tree Construction
; TIME-LEGACY-DAG: Module Verifier
; TIME-LEGACY-DAG: Target Library Information
@@ -11,5 +20,20 @@
define i32 @foo() {
%res = add i32 5, 4
+ br label %loop1
+loop1:
+ br i1 false, label %loop1, label %end
+end:
ret i32 %res
}
+
+define void @bar_with_loops() {
+ br label %loop1
+loop1:
+ br i1 false, label %loop1, label %loop2
+loop2:
+ br i1 true, label %loop2, label %end
+end:
+ ret void
+
+}