[llvm-commits] [llvm-gcc-4.0] llvm-gcc patch for PR1582 (review only)

Zhou Sheng zhousheng00 at gmail.com
Fri Nov 16 22:20:36 PST 2007


Hi,

Sorry for reply late.  Attached is the modified patch. It's now just for
NoAlias attribute and more safe for just eliminating bitcast that losing
attribute case. Thanks for reviewing in advance.

Sheng.

2007/11/9, Duncan Sands <baldrick at free.fr>:
>
> Hi,
>
> > This patch is for PR1582. As recent discuss on that pr, the C++ FE
> doesn't
> > track the restrict qualifier in the function declaration at all. When
> > llvm-gcc handling CALL_EXPR and emiting callInst instruction, it can't
> get
> > the "NoAlias" attribute, and hence insert a BitCast in CallInst. This
> patch
> > is to eliminate this bitcast.
>
> what if one is varargs but not the other?  Also, your patch is quite
> general
> in that it ignores *any* parameter attributes, not just restrict.  I think
> this
> is basically ok (though it should presumably also ignore return
> attributes).
> That said, it could instead form the union of the previous attributes and
> any new ones.
> But I think the safest approach is to assert that any new attributes
> include the old
> ones, meaning that attributes can only be added, and no attributes
> removed,
> when going from the old to the new functions.
>
> Ciao,
>
> Duncan.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20071117/aa019856/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-convert.cpp.patch
Type: text/x-patch
Size: 2497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20071117/aa019856/attachment.bin>


More information about the llvm-commits mailing list