Displaying 2 results from an estimated 2 matches for "set_obj".
2012 Mar 12
2
[LLVMdev] Assignment of large objects, optimization?
Hi,
My fronted generates (bad) code, which I see that LLVM is unable to optimize. For example, code similar to:
%a = type [32 x i16]
declare void @set_obj(%a*)
declare void @use_obj(%a*)
define void @foo() {
entry:
%a1 = alloca %a
%a2 = alloca %a
call void @set_obj(%a* %a2)
%a3 = load %a* %a2
store %a %a3, %a* %a1
call void @use_obj(%a* %a1)
ret void
}
(Or with load/store replaced with memcpy).
In C pseudo-code this is similar to:
a...
2012 Mar 12
0
[LLVMdev] Assignment of large objects, optimization?
Hi Patrik,
> My fronted generates (bad) code, which I see that LLVM is unable to optimize.
> For example, code similar to:
> %a = type [32 x i16]
> declare void @set_obj(%a*)
> declare void @use_obj(%a*)
> define void @foo() {
> entry:
> %a1 = alloca %a
> %a2 = alloca %a
> call void @set_obj(%a* %a2)
> %a3 = load %a* %a2
> store %a %a3, %a* %a1
> call void @use_obj(%a* %a1)
> ret void
> }
> (Or with load/store replaced with memcp...