class MemorySSA {
public:
MemorySSA(Function &, AliasAnalysis *, DominatorTree *);
+
+ // MemorySSA must remain where it's constructed; Walkers it creates store
+ // pointers to it.
+ MemorySSA(MemorySSA &&) = delete;
+
~MemorySSA();
MemorySSAWalker *getWalker();
/// the walker it uses or returns.
virtual void invalidateInfo(MemoryAccess *) {}
- virtual void verify(const MemorySSA *MSSA) { assert(MSSA == this->MSSA); }
-
protected:
friend class MemorySSA; // For updating MSSA pointer in MemorySSA move
// constructor.
#endif
return Result;
}
-
- void verify(const MemorySSA *MSSA) { assert(MSSA == &this->MSSA); }
};
struct RenamePassData {
// additional query becomes heavily used we may decide to cache the result.
// Walker instantiations will decide how to set the SkipSelf bool.
MemoryAccess *getClobberingMemoryAccessBase(MemoryAccess *, bool);
- void verify(const MemorySSA *MSSA) { Walker.verify(MSSA); }
};
/// A MemorySSAWalker that does AA walks to disambiguate accesses. It no
if (auto *MUD = dyn_cast<MemoryUseOrDef>(MA))
MUD->resetOptimized();
}
-
- void verify(const MemorySSA *MSSA) override {
- MemorySSAWalker::verify(MSSA);
- Walker->verify(MSSA);
- }
};
class MemorySSA::SkipSelfWalker final : public MemorySSAWalker {
if (auto *MUD = dyn_cast<MemoryUseOrDef>(MA))
MUD->resetOptimized();
}
-
- void verify(const MemorySSA *MSSA) override {
- MemorySSAWalker::verify(MSSA);
- Walker->verify(MSSA);
- }
};
} // end namespace llvm
verifyDomination(F);
verifyOrdering(F);
verifyDominationNumbers(F);
- Walker->verify(this);
// Previously, the verification used to also verify that the clobberingAccess
// cached by MemorySSA is the same as the clobberingAccess found at a later
// query to AA. This does not hold true in general due to the current fragility