llvm-project/llvm/test/Other/print-function-size.ll
Arthur Eubanks 8c6305b8b4 [NewPM] Print function/SCC size with -debug-pass-manager
This is helpful for debugging issues with very large functions or SCC.
Also helpful when function names are very large and it's hard to tell the number of nodes in an SCC.

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D128003
2022-07-19 09:00:37 -07:00

15 lines
327 B
LLVM

; RUN: opt -S -debug-pass-manager -passes=no-op-function < %s 2>&1 | FileCheck %s
; CHECK: Running pass: NoOpFunctionPass on f (3 instructions)
; CHECK: Running pass: NoOpFunctionPass on g (1 instruction)
define i32 @f(i32 %i) {
%a = add i32 %i, 1
%b = add i32 %a, 1
ret i32 %b
}
define i32 @g(i32 %i) {
ret i32 0
}