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

Duncan Sands baldrick at free.fr
Thu Nov 8 23:55:56 PST 2007


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.



More information about the llvm-commits mailing list