[llvm] r209638 - [PPC] Use alias symbols in address computation.
Rafael EspĂndola
rafael.espindola at gmail.com
Wed May 28 10:40:08 PDT 2014
> I don't have one. If you could try a bootstrap, that would be great.
The difference is from cases like
define void @foo() {
ret void
}
declare i32 @bar(i8*)
define void @zed() {
call i32 @bar(i8* bitcast (void ()* @foo to i8*))
ret void
}
trunk produces
addis 3, 2, .LC1 at toc@ha
ld 3, .LC1 at toc@l(3)
and the patch produces
addis 3, 2, .LC1 at toc@ha
addi 3, 3, .LC1 at toc@l
So it looks like it decides to use a constant pool and then passes the
address of the pool. If instead of a function we have a variable, both
trunk and patch work by doing
addis 3, 2, var at toc@ha
addi 3, 3, var at toc@l
that is, they don't create the constant pool entry.
It is easy to fix the patch to do a load for functions, but I wonder
why it is considered better/necessary to create a constant pull for
them. Couldn't we use
addis 3, 2, func at toc@ha
addi 3, 3, func at toc@l
Cheers,
Rafael
More information about the llvm-commits
mailing list