forked from OSchip/llvm-project
LICM - remove unused variable and reduce scope of another variable. NFCI.
Appeases both clang static analyzer and cppcheck llvm-svn: 373453
This commit is contained in:
parent
619bcebc05
commit
da4cbae696
|
|
@ -1383,8 +1383,7 @@ static Instruction *CloneInstructionInExitBlock(
|
|||
if (!I.getName().empty())
|
||||
New->setName(I.getName() + ".le");
|
||||
|
||||
MemoryAccess *OldMemAcc;
|
||||
if (MSSAU && (OldMemAcc = MSSAU->getMemorySSA()->getMemoryAccess(&I))) {
|
||||
if (MSSAU && MSSAU->getMemorySSA()->getMemoryAccess(&I)) {
|
||||
// Create a new MemoryAccess and let MemorySSA set its defining access.
|
||||
MemoryAccess *NewMemAcc = MSSAU->createMemoryAccessInBB(
|
||||
New, nullptr, New->getParent(), MemorySSA::Beginning);
|
||||
|
|
@ -2115,9 +2114,8 @@ bool llvm::promoteLoopAccessesToScalars(
|
|||
PreheaderLoad->setAAMetadata(AATags);
|
||||
SSA.AddAvailableValue(Preheader, PreheaderLoad);
|
||||
|
||||
MemoryAccess *PreheaderLoadMemoryAccess;
|
||||
if (MSSAU) {
|
||||
PreheaderLoadMemoryAccess = MSSAU->createMemoryAccessInBB(
|
||||
MemoryAccess *PreheaderLoadMemoryAccess = MSSAU->createMemoryAccessInBB(
|
||||
PreheaderLoad, nullptr, PreheaderLoad->getParent(), MemorySSA::End);
|
||||
MemoryUse *NewMemUse = cast<MemoryUse>(PreheaderLoadMemoryAccess);
|
||||
MSSAU->insertUse(NewMemUse, /*RenameUses=*/true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue