[LLVMbugs] [Bug 9022] New: How to set call attributes via C binding?
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jan 21 12:11:34 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9022
Summary: How to set call attributes via C binding?
Product: Documentation
Version: 2.8
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: General docs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: llvm at henning-thielemann.de
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6031)
--> (http://llvm.org/bugs/attachment.cgi?id=6031)
attempt to set ReadNone attribute at call
I wonder how to set an attribute like readnone to a call.
Attached is a C program where I try to do add the readnone attribute using
LLVMAddInstrAttribute, which seems to be wrong, since this adds the attribute
to the result of the call. The verifier pass thus complains:
Attribute readnone only applies to the function!
%2 = call readnone double @llvm.exp.f64(double %0)
Attribute readnone only applies to the function!
%3 = call readnone double @llvm.sin.f64(double %1)
Broken module found, compilation aborted!
Stack dump:
0. Running pass 'Function Pass Manager' on module '_module'.
1. Running pass 'Module Verifier' on function '@arithmetic'
Aborted
I also tried LLVMAddAttribute (but as far as I understand this is for
parameters of the surrounding function) and LLVMAddFunctionAttr (but I want to
add to a call, not a function). Both do not work.
How can I add an attribute to a call? Or is this not necessary at all?
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list