[llvm-dev] [GlobalISel] Legalization for memcpy family intrinsics

Devadasan, Christudasan via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 16 06:47:17 PST 2020


Hi All,

I was trying to legalize the family of memcpy intrinsics (memcpy, memmove and memset) for AMDGPU and found that the combiner functions optimizeMemcpy, optimizeMemmove and optimizeMemset implemented in CombinerHelper.cpp pretty much handle these lowering.

Can we move these functions to Legalizer entirely and perform a custom legalization to handle their expansion?
The reason is, in the Combiner it is more of an optimization action rather than something required always for correctness.

On the other hand, if these combiner expansions turned out to be unavoidable, we should move these function into a common file.
In that way, both Legalizer and Combiner can take advantage of them.

Regards,
CD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201216/c1b58644/attachment.html>


More information about the llvm-dev mailing list