Block splitting is done with either identical edges being merged, or not.
Only critical edges can be split without merging identical edges based on an option.
Teach the memoryssa updater to take this into account: for the same edge between two blocks only move one entry from the Phi in Old to the new Phi in New.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks!
lib/Analysis/MemorySSAUpdater.cpp | ||
---|---|---|
1013 ↗ | (On Diff #163610) | (I see that practically, the answer is "no". Just curious how strongly we're tailoring this function for the user) Is it theoretically reasonable for Preds to contain duplicates of the same BasicBlock if !IdenticalEdgesWereMerged? The concern being that if I, as the user, call wireOldPredecessorsToNewImmediatePredecessor(Old, New, {BB, BB}, false);, we'll only end up moving one instance of BB. If this concern is founded, please add an assert that PredsSet.size() == Preds.size() if !IdenticalEdgesWereMerged, so it's obvious that said case is broken if someone tries to depend on it in the future (which I'm totally cool with, given that, like said, this can't happen at the moment). |
lib/Analysis/MemorySSAUpdater.cpp | ||
---|---|---|
1013 ↗ | (On Diff #163610) | Agreed, added the assert! |