mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
03001780da
`parseBitcodeFile()` uses the generic `getLazyBitcodeFile()` function as a helper. Since `parseBitcodeFile()` isn't actually lazy -- it calls `MaterializeAllPermanently()` -- bypass the unnecessary call to `materializeForwardReferencedFunctions()` by extracting out a common helper function. This removes the last of the use-list churn caused by blockaddresses. This highlights that we can't reproduce use-list order of globals and constants when parsing lazily -- but that's necessarily out of scope. When we're parsing lazily, we never have all the functions in memory, so the use-lists of globals (and constants that reference globals) are always incomplete. This is part of PR5680. llvm-svn: 214581
47 lines
841 B
LLVM
47 lines
841 B
LLVM
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
|
; RUN: verify-uselistorder < %s -preserve-bc-use-list-order
|
|
; PR9857
|
|
|
|
define void @f(i8** nocapture %ptr1) {
|
|
; CHECK: define void @f
|
|
entry:
|
|
br label %here.i
|
|
|
|
here.i:
|
|
store i8* blockaddress(@doit, %here), i8** %ptr1, align 8
|
|
; CHECK: blockaddress(@doit, %here)
|
|
br label %doit.exit
|
|
|
|
doit.exit:
|
|
ret void
|
|
}
|
|
|
|
define void @doit(i8** nocapture %pptr) {
|
|
; CHECK: define void @doit
|
|
entry:
|
|
br label %here
|
|
|
|
here:
|
|
store i8* blockaddress(@doit, %here), i8** %pptr, align 8
|
|
; CHECK: blockaddress(@doit, %here)
|
|
br label %end
|
|
|
|
end:
|
|
ret void
|
|
}
|
|
|
|
; PR13895
|
|
define void @doitagain(i8** nocapture %pptr) {
|
|
; CHECK: define void @doitagain
|
|
entry:
|
|
br label %here
|
|
|
|
here:
|
|
store i8* blockaddress(@doit, %here), i8** %pptr, align 8
|
|
; CHECK: blockaddress(@doit, %here)
|
|
br label %end
|
|
|
|
end:
|
|
ret void
|
|
}
|