llvm-project
fd9ec736 - [SROA][NFC] Move duplicated code in presplitLoadsAndStores into class (#224653)

Commit
24 days ago
[SROA][NFC] Move duplicated code in presplitLoadsAndStores into class (#224653) presplitLoadsAndStores contains a bunch of duplicated code to do with iterating over split slices and generating the loads/stores/slices for them. Move all of this into a helper class to get rid of this duplication. There's one place where the code isn't an exact duplicate, and that's in the handling of metadata on split stores, where stores of loads had some extra metadata compared to other stores, and now all stores have this extra metadata. This doesn't cause any change in behaviour though, as the stores that now get extra metadata are in the Stores list, meaning they're stores to allocas that we're pre-splitting so they can later be eliminated, which means it doesn't matter what metadata they have.
Parents
Loading