I am writing a pass for a custom backend that I am developing and I need to iterator over all memory based instructions in a program. Currently I iterate over all instructions in a MachineFunction, but I was wondering if there is an efficient way that I can use that only goes over the instructions that have MachineMemOperands that is faster than a linear scan?
Thanks,
Micah