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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs