This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Fix incorrect cloning of MachineMemOperands
ClosedPublic

Authored by arsenm on Apr 19 2022, 12:03 PM.

Details

Summary

There were two problems with directly copying the MMOs from the old
function. The MMOs are owned by the function's Allocator, so need to
be reallocated anyways (surprisingly I didn't notice breakage on
this). Second, the PseudoSourceValues are also allocated per function
and need to be reallocated.

Diff Detail