[Mesa-dev] [PATCH] radv/ac: enable loop unrolling.

Matt Arsenault arsenm2 at gmail.com
Fri Feb 24 03:36:29 UTC 2017


> On Feb 23, 2017, at 19:27, Dave Airlie <airlied at gmail.com> wrote:
> 
> +static void set_unroll_metadata(struct nir_to_llvm_context *ctx,
> +			       LLVMValueRef br)
> +{
> +	unsigned kind = LLVMGetMDKindIDInContext(ctx->context, "llvm.loop", 9);
> +	LLVMValueRef md_unroll;
> +	LLVMValueRef full_arg = LLVMMDStringInContext(ctx->context, "llvm.loop.unroll.full", 21);
> +	LLVMValueRef full = LLVMMDNodeInContext(ctx->context, &full_arg, 1);
> +
> +	LLVMValueRef md_args[] = {NULL, full};
> +	md_unroll = LLVMMDNodeInContext(ctx->context, md_args, 2);
> +	ac_metadata_point_op0_to_itself(md_unroll);
> +
> +	LLVMSetMetadata(br, kind, md_unroll);
> +}
> +

Why are you forcing full unrolling of all loops?

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170223/f9def31c/attachment-0001.html>


More information about the mesa-dev mailing list