[LLVMdev] giving metadata a function parameter as an operand
Shemer, Anat
anat.shemer at intel.com
Tue Feb 12 04:33:41 PST 2013
Hi,
Is it possible to give an instruction metadata that accepts function argument as operand? The 2 functions are in the same module so the metadata operand can be resolved. Here is how I imagine it should look like:
define i32 @f(i32 %v) {
%v0 = call i32 @f1 (i32 %v, metadata !0) ; this ok
ret i32 %v0
}
define i32 @f1 (i32 %v, metadata %md) { ; and this is ok too
%t0 = add i32 %v, 1, !md !%md
; ^ here it says it expects an integer
ret i32 %t0
}
!0 = metadata !{i32 4}
Thanks, Anat
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130212/f925385a/attachment.html>
More information about the llvm-dev
mailing list