[llvm-dev] RFC: Memcpy inlining in IR
Amara Emerson via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 20 16:05:05 PDT 2019
> On Jun 20, 2019, at 3:54 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:
>
>
>
>> On Jun 19, 2019, at 11:41 PM, Amara Emerson via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> Hi all,
>>
>> For GlobalISel, we’re exploring options for implementing inlining optimizations for memcpy and friends. However, looking around the existing implementation, I don’t see anything that would particularly be problematic for us to do it at the IR level.
>>
>> The existing TLI hooks to specify how certain memcpy calls should be lowered doesn’t have anything too SelectionDAG specific, and an IR lowering pass could be shared in future between SDAG and GISel. Does anyone see issues with this?
>>
>> Thanks,
>> Amara
>
> We already have lib/Transforms/Utils/LowerMemIntrinsics.cpp, there just isn’t a general pass that expands these for targets. AMDGPU already always use this for memcpy handling.
>
>
> -Matt
>
Sure, that might end up sharing some code but the key thing is to use the TLI hooks to implement the same optimizations that SelectionDAG currently does.
Amara
More information about the llvm-dev
mailing list