1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/test/Other/scc-deleted-printer.ll
Arthur Eubanks d577e2748f [NewPM] Print pre-transformation IR name in --print-after-all
Sometimes a transformation can change the name of some IR (e.g. an SCC
with functions added/removed). This can be confusing when debug logging
doesn't match the post-transformation name. The specific example I came
across was that --print-after-all said the inliner was working on an SCC
that only contained one function, but calls in multiple functions were
getting inlined. After all inlining, the current SCC only contained one
function.

Piggyback off of the existing logic to handle invalidated IR +
--print-module-scope. Simply always store the IR description and use
that.

Reviewed By: jamieschmeiser

Differential Revision: https://reviews.llvm.org/D106290
2021-07-20 10:20:10 -07:00

21 lines
611 B
LLVM

; RUN: opt < %s 2>&1 -disable-output \
; RUN: -passes=inline -print-before-all -print-after-all | FileCheck %s
; RUN: opt < %s 2>&1 -disable-output \
; RUN: -passes=inline -print-before-all -print-after-all -print-module-scope | FileCheck %s
; CHECK: IR Dump Before InlinerPass on (tester, foo)
; CHECK: IR Dump After InlinerPass on (tester, foo) (invalidated)
; CHECK: IR Dump Before InlinerPass on (tester)
; CHECK: IR Dump After InlinerPass on (tester)
define void @tester() noinline {
call void @foo()
ret void
}
define internal void @foo() alwaysinline {
call void @tester()
ret void
}