llvm.org GIT mirror llvm / 66d922c
improve description of param/ret attrs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57061 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
1 changed file(s) with 14 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
825825
826826

                  
                
827827 declare i32 @printf(i8* noalias , ...)
828 declare i32 @atoi(i8 zeroext*)
828 declare i32 @atoi(i8 zeroext)
829 declare signext i8 @returns_signed_char()
829830
830831
831832
835836

Currently, only the following parameter attributes are defined:

836837
837838
zeroext
838
This indicates that the parameter should be zero extended just before
839 a call to this function.
839
This indicates to the code generator that the parameter or return value
840 should be zero-extended to a 32-bit value by the caller (for a parameter)
841 or the callee (for a return value).
840842
841843
signext
842
This indicates that the parameter should be sign extended just before
843 a call to this function.
844
This indicates to the code generator that the parameter or return value
845 should be sign-extended to a 32-bit value by the caller (for a parameter)
846 or the callee (for a return value).
844847
845848
inreg
846849
This indicates that this parameter or return value should be treated
847850 in a special target-dependent fashion during while emitting code for a
848851 function call or return (usually, by putting it in a register as opposed
849 to memory; in some places it is used to distinguish between two different
850 kinds of registers). Use of this attribute is target-specific
852 to memory, though some targets use it to distinguish between two different
853 kinds of registers). Use of this attribute is target-specific.
851854
852855
byval
853856
This indicates that the pointer parameter should really be passed by
855858 pointee is made between the caller and the callee, so the callee is unable
856859 to modify the value in the callee. This attribute is only valid on LLVM
857860 pointer arguments. It is generally used to pass structs and arrays by
858 value, but is also valid on scalars (even though this is silly).
861 value, but is also valid on pointers to scalars.
859862
860863
sret
861864
This indicates that the pointer parameter specifies the address of a
862865 structure that is the return value of the function in the source program.
863 Loads and stores to the structure are assumed not to trap.
864 May only be applied to the first parameter.
866 This pointer must be guaranteed by the caller to be valid: loads and stores
867 to the structure may be assumed by the callee to not to trap. This may only
868 be applied to the first parameter.
865869
866870
noalias
867871
This indicates that the parameter does not alias any global or any other