unsigned attrib_mask)
{
LLVMValueRef call;
- bool set_callsite_attrs = !(attrib_mask & AC_FUNC_ATTR_LEGACY);
LLVMTypeRef param_types[32];
assert(param_count <= 32);
LLVMSetFunctionCallConv(function, LLVMCCallConv);
LLVMSetLinkage(function, LLVMExternalLinkage);
-
- if (!set_callsite_attrs)
- ac_add_func_attributes(ctx->context, function, attrib_mask);
}
call = LLVMBuildCall2(ctx->builder, function_type, function, params, param_count, "");
- if (set_callsite_attrs)
- ac_add_func_attributes(ctx->context, call, attrib_mask);
+ ac_add_func_attributes(ctx->context, call, attrib_mask);
return call;
}
void ac_add_func_attributes(LLVMContextRef ctx, LLVMValueRef function, unsigned attrib_mask)
{
attrib_mask |= AC_FUNC_ATTR_NOUNWIND;
- attrib_mask &= ~AC_FUNC_ATTR_LEGACY;
while (attrib_mask) {
enum ac_func_attr attr = 1u << u_bit_scan(&attrib_mask);
AC_FUNC_ATTR_READONLY = (1 << 6),
AC_FUNC_ATTR_WRITEONLY = (1 << 7),
AC_FUNC_ATTR_CONVERGENT = (1 << 8),
-
- /* Legacy intrinsic that needs attributes on function declarations
- * and they must match the internal LLVM definition exactly, otherwise
- * intrinsic selection fails.
- */
- AC_FUNC_ATTR_LEGACY = (1u << 31),
};
enum ac_target_machine_options