Hi, I’m writing a machine function pass that looks for metadata inserted by an IR function pass by getting the Value
objects of MachineMemOperand
objects with .getValue()
then calling .getMetadata()
on the instructions - however, custom metadata that I insert from the IR is not preserved by the time I reach the machine function pass. If from the machine function pass I call .getFunction()
on the machine function and then .print()
on the IR function, the custom metadata I’ve inserted is no longer there, while other metadata like tbaa
still is.
How can I force my metadata to be preserved when lowering from the middle to the backend, as other metadata is?
I’m fairly sure my problem exists more at the IR level than it does the backend, but please correct me if I’m wrong and I’ll remake this post in the backend category.