[LLVMbugs] [Bug 12607] New: llvm-link behavior change (3.1 vs 2.9) with GlobalAliases
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 20 17:43:57 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12607
Bug #: 12607
Summary: llvm-link behavior change (3.1 vs 2.9) with
GlobalAliases
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: boulos at cs.stanford.edu
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
I've got some bitcode I produce with clang and then link with llvm-link before
loading at runtime for use in a JIT. We're currently using LLVM 2.9, and in
preparing for a change to LLVM 3.1 I ran into a "recursively calling the JIT"
assert. I tracked it down to being a difference in my linked module: in LLVM
2.9 aliases seem to be resolved at link time (calls to an alias are replaced by
calls to the underlying function), while in 3.1 the calls to the alias remain.
Here's the simplest IR I could make that demonstrates the problem (including
the result of llvm-link AliasDefn.ll AliasUse.ll with both LLVM 2.9 and 3.1):
-------------------------
; AliasDefn.ll
@MyAlias = alias void ()* @Aliasee
define void @Aliasee() {
entry:
ret void
}
-------------------------
; AliasUse.ll
declare void @MyAlias()
define void @Caller() {
entry:
call void @MyAlias()
ret void
}
-------------------------
; ModuleID = 'Alias29.bc'
@MyAlias = alias void ()* @Aliasee
define void @Aliasee() {
entry:
ret void
}
define void @Caller() {
entry:
call void @Aliasee()
ret void
}
-------------------------
; ModuleID = 'Alias31.bc'
@MyAlias = alias void ()* @Aliasee
define void @Aliasee() {
entry:
ret void
}
define void @Caller() {
entry:
call void @MyAlias()
ret void
}
-------------------------
Is this behavior expected? Should I be complaining about the behavior in
JITEmitter::getPointerToGlobal instead?
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list