1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

MemorySSA: Remove argument to createNewAccess function.

There is only one caller of MemorySSA::createNewAccess, and it passes true
as the IgnoreNonMemory argument. Remove that argument and fold its behavior
into createNewAccess.

llvm-svn: 270812
This commit is contained in:
Peter Collingbourne 2016-05-26 01:19:17 +00:00
parent 50e4140b70
commit 1c0a9b72a0
2 changed files with 4 additions and 5 deletions

View File

@ -575,7 +575,7 @@ private:
void computeDomLevels(DenseMap<DomTreeNode *, unsigned> &DomLevels);
void markUnreachableAsLiveOnEntry(BasicBlock *BB);
bool dominatesUse(const MemoryAccess *, const MemoryAccess *) const;
MemoryUseOrDef *createNewAccess(Instruction *, bool ignoreNonMemory = false);
MemoryUseOrDef *createNewAccess(Instruction *);
MemoryAccess *findDominatingDef(BasicBlock *, enum InsertionPlace);
void removeFromLookups(MemoryAccess *);

View File

@ -255,7 +255,7 @@ MemorySSAWalker *MemorySSA::buildMemorySSA(AliasAnalysis *AA,
bool InsertIntoDef = false;
AccessListType *Accesses = nullptr;
for (Instruction &I : B) {
MemoryUseOrDef *MUD = createNewAccess(&I, true);
MemoryUseOrDef *MUD = createNewAccess(&I);
if (!MUD)
continue;
InsertIntoDef |= isa<MemoryDef>(MUD);
@ -353,8 +353,7 @@ MemorySSAWalker *MemorySSA::buildMemorySSA(AliasAnalysis *AA,
}
/// \brief Helper function to create new memory accesses
MemoryUseOrDef *MemorySSA::createNewAccess(Instruction *I,
bool IgnoreNonMemory) {
MemoryUseOrDef *MemorySSA::createNewAccess(Instruction *I) {
// Find out what affect this instruction has on memory.
ModRefInfo ModRef = AA->getModRefInfo(I);
bool Def = bool(ModRef & MRI_Mod);
@ -362,7 +361,7 @@ MemoryUseOrDef *MemorySSA::createNewAccess(Instruction *I,
// It's possible for an instruction to not modify memory at all. During
// construction, we ignore them.
if (IgnoreNonMemory && !Def && !Use)
if (!Def && !Use)
return nullptr;
assert((Def || Use) &&