mirror of
https://github.com/RPCS3/llvm.git
synced 2026-08-27 21:00:01 -04:00
1648ceaabc
Now that the call graph supports efficient replacement of a function and spurious reference edges, we can port ArgumentPromotion to the new pass manager very easily. The old PM-specific bits are sunk into callbacks that the new PM simply doesn't use. Unlike the old PM, the new PM simply does argument promotion and afterward does the update to LCG reflecting the promoted function. Differential Revision: https://reviews.llvm.org/D29580 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294667 91177308-0d34-0410-b5e6-96231b3b80d8
33 lines
790 B
LLVM
33 lines
790 B
LLVM
; RUN: opt -S -argpromotion < %s | FileCheck %s
|
|
; RUN: opt -S -passes=argpromotion < %s | FileCheck %s
|
|
target triple = "x86_64-pc-windows-msvc"
|
|
|
|
define internal void @callee(i8*) {
|
|
entry:
|
|
call void @thunk()
|
|
ret void
|
|
}
|
|
|
|
define void @test1() personality i32 (...)* @__CxxFrameHandler3 {
|
|
entry:
|
|
invoke void @thunk()
|
|
to label %out unwind label %cpad
|
|
|
|
out:
|
|
ret void
|
|
|
|
cpad:
|
|
%pad = cleanuppad within none []
|
|
call void @callee(i8* null) [ "funclet"(token %pad) ]
|
|
cleanupret from %pad unwind to caller
|
|
}
|
|
|
|
; CHECK-LABEL: define void @test1(
|
|
; CHECK: %[[pad:.*]] = cleanuppad within none []
|
|
; CHECK-NEXT: call void @callee() [ "funclet"(token %[[pad]]) ]
|
|
; CHECK-NEXT: cleanupret from %[[pad]] unwind to caller
|
|
|
|
declare void @thunk()
|
|
|
|
declare i32 @__CxxFrameHandler3(...)
|