[llvm-dev] Question on llvm.mem* intrinsics

Finkel, Hal J. via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 10 12:34:40 PDT 2019


On 9/10/19 2:09 PM, via llvm-dev wrote:
> Hi there lowering experts,
>
> Can the llvm.mem* intrinsics ever turn into a library call? Or do
> they invariably turn into inline code?


These can certainly turn into library calls. See, for example, the code in:

   SelectionDAG::getMemcpy (in SelectionDAG.cpp), which is called by the 
code in SelectionDAGBuilder::visitIntrinsicCall (in 
SelectionDAGBuilder.cpp) handling Intrinsic::memcpy.

  -Hal


>
> This comes up because there was a patch to StackProtector to use
> CaptureTracking instead of a home-grown analysis, which changes
> the treatment of calls to intrinsics.  (The old code treated them
> as normal calls, the new code decides intrinsics can never capture.)
> But if llvm.mem* intrinsics can turn into real function calls, we
> need to pay attention to that.
>
> Thanks,
> --paulr
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-dev mailing list