[LLVMbugs] [Bug 9018] New: Documentation of function attributes in a 'call'
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jan 21 11:07:22 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9018
Summary: Documentation of function attributes in a 'call'
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
http://llvm.org/docs/LangRef.html
says, that the allowed function attributes for 'call' are 'noreturn',
'nounwind', 'readonly' and 'readnone',
but it does not tell how these attributes interact with the ones given in the
according 'declare'.
The description of function attributes says, that function attributes are
attributes of the function - so how can function attributes be part of a
function call?
Is there a difference between
define double @arith(double, double) {
_L1:
%2 = call double @llvm.sin.f64(double %0)
%3 = call double @llvm.exp.f64(double %2)
%4 = fadd double %3, %1
ret double %4
}
declare double @llvm.sin.f64(double) readnone
declare double @llvm.exp.f64(double) readnone
and
define double @arith(double, double) {
_L1:
%2 = call double @llvm.sin.f64(double %0) readnone
%3 = call double @llvm.exp.f64(double %2) readnone
%4 = fadd double %3, %1
ret double %4
}
declare double @llvm.sin.f64(double)
declare double @llvm.exp.f64(double)
and
define double @arith(double, double) {
_L1:
%2 = call double @llvm.sin.f64(double %0) readnone
%3 = call double @llvm.exp.f64(double %2) readnone
%4 = fadd double %3, %1
ret double %4
}
declare double @llvm.sin.f64(double) readnone
declare double @llvm.exp.f64(double) readnone
?
I guess that the union of the sets of attributes of 'declare' and 'call' is
considered when calling a function. If this is true, then the above functions
should be equivalent.
--
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