This is an archive of the discontinued LLVM Phabricator instance.

MSSA Walker Pre-refactor
AbandonedPublic

Authored by george.burgess.iv on Jun 27 2016, 5:23 PM.

Details

Reviewers
None
Summary

This is a set of refactors split out from the new MSSA walker. This entire patch is NFC.

No reviewers, since this is basically one big refactor. If someone wants to explicitly LGTM it, they're welcome to, but the only reasons I'm putting this up here are:

  • Some of the refactors here make little sense if we don't adopt the new walker (e.g. just committing all of this seems mildly pointless), and
  • Reviewing the new walker is much easier if this code is split out

This is expected to be committed with the new MSSA walker (review coming soon). Specifically, the new walker will be applied on top of this patch.

If the new walker doesn't land, some of the tiny refactors here (e.g. adding // namespace llvm, etc.) will be committed separately; I'm just lazy and didn't feel like splitting them out further. :)

Diff Detail

Event Timeline

george.burgess.iv retitled this revision from to MSSA Walker Pre-refactor.
george.burgess.iv updated this object.
george.burgess.iv added a subscriber: llvm-commits.
dberlin added inline comments.
lib/Transforms/Utils/MemorySSA.cpp
551

I see you removed this - this is a utility being used as part of updating for another pass i haven't submitted yet.

856

This makes no sense unless the block we are talking about is the entry block.
Otherwise, how are they in the same block?

(if it is the entry block, the loop below will give the correct answer, no?)

george.burgess.iv marked an inline comment as done.Jun 27 2016, 6:19 PM
george.burgess.iv added inline comments.
lib/Transforms/Utils/MemorySSA.cpp
551

Sounds good; will unremove. Thanks for the heads up.

856

This is just a refactor of the old (and the new changes locallyDominates to dominates, since the only user of locallyDominates that I could find was the current walker, so we'd probably readd isLiveOnEntryDef(Dominator) anyway, since it could save domtree stuff.).

If we don't want to kill locallyDominates, I'm happy to remove this, because yes, the below loop should catch this case.

If we think dominates is necessary, go for it.

george.burgess.iv abandoned this revision.Jul 18 2016, 6:38 PM
george.burgess.iv marked an inline comment as done.

Committed with D21777 (as a part of r275940), as promised.