[cfe-commits] [PATCH] make __builtin_annotation generic
Xi Wang
xi.wang at gmail.com
Tue Apr 24 11:05:16 PDT 2012
Hi,
Currently __builtin_annotation() only annotates an i32.
i32 __builtin_annotation(i32, string);
Applying it to i64 (e.g., long long) generates the following IR.
trunc i64 {{.*}} to i32
call i32 @llvm.annotation.i32
zext i32 {{.*}} to i64
The redundant truncation and extension make the result difficult to use.
This patch makes __builtin_annotation() generic.
type __builtin_annotation(type, string);
For the i64 example, it simplifies the generated IR to:
call i64 @llvm.annotation.i64
Please review. Thanks.
- xi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: annotation.patch
Type: application/octet-stream
Size: 5988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120424/c963b27c/attachment.obj>
More information about the cfe-commits
mailing list