mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
d577e2748f
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
21 lines
611 B
LLVM
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
|
|
}
|