[PATCH] D107354: [MachineMemOperand] learn about ptr_provenance

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 05:20:49 PDT 2022


jeroen.dobbelaere added a comment.

In D107354#3495878 <https://reviews.llvm.org/D107354#3495878>, @jeroen.dobbelaere wrote:

> In D107354#3494239 <https://reviews.llvm.org/D107354#3494239>, @Zoxc wrote:
>
>> Given that the provenance gets dropped in https://reviews.llvm.org/D107356, how does it end up in machine operands?
>
> Good question. The provenance embedded in the MachineOperand here originates from the ptr_provenance operand in load/store instructions.
> Your question does point out that https://reviews.llvm.org/D107356 (aka CodeGen/IntrinsicLowering) is too early  if we want to track the more complex forms
> of provenance after lowering.

Having looked deeper into it: `IntrinsicLowering.cpp` seems only to be used for the interpreter. There it makes sense to eliminate the noalias/ptr_provenance intrinsics.
During code generation, SelectionDAG is taking care of seeing through the intrinsics while lowering. But, the original llvm-IR (with intrinsics) stays available for the alias analysis. So the machine operands must be able to see it.
(Although you might need to enable AA analysis on machine ir)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107354/new/

https://reviews.llvm.org/D107354



More information about the llvm-commits mailing list