diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/MemorySSA.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/MemorySSA.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/MemorySSA.cpp b/llvm/lib/Transforms/Utils/MemorySSA.cpp index 896b24fc16e..b87a6d611b1 100644 --- a/llvm/lib/Transforms/Utils/MemorySSA.cpp +++ b/llvm/lib/Transforms/Utils/MemorySSA.cpp @@ -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) && |