[LLVMdev] 回复: About porting llvm-gcc frontend.
任坤
hbrenkun at yahoo.cn
Sat Sep 26 04:59:16 PDT 2009
Dear Duncan Sands:
Yes, you are right. This IR is correct. This bug is caused by llvm-ld.
Edwin has fixed it. Please refer to:
Edwin <edwintorok at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Fixed here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090921/087797.html
________________________________
发件人: Duncan Sands <baldrick at free.fr>
收件人: 任坤 <hbrenkun at yahoo.cn>
抄 送: llvm <llvmdev at cs.uiuc.edu>
已发送: 2009/9/24(周四), 下午11:24:32
主 题: Re: [LLVMdev] About porting llvm-gcc frontend.
Hi 浠诲潳,
> void vfu1(union MYunion u) {
> u.ui = 99;
> }
here u is passed by copy, so vfu1 has no externally
visible effect. I think you meant: union MYunion *u
> define void @vfu1(%struct.MYunion* byval align 4 %u) nounwind {
Here "byval" means that a pointer to a temporary copy of u is being
passed, not u itself. Thus any writes to the %u parameter have no
effect outside this function.
> /3. ***********My question*********/
> It means that function "void vfu1(union MYunion u)" modifies global varible myunion.
This call
vfu1(myunion);
does not result in myunion being modified.
Ciao,
Duncan.
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090926/b82fd33d/attachment.html>
More information about the llvm-dev
mailing list