[llvm] r300947 - [MSSA] Clean up the updater a bit. NFC
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 20 21:54:53 PDT 2017
Author: gbiv
Date: Thu Apr 20 23:54:52 2017
New Revision: 300947
URL: http://llvm.org/viewvc/llvm-project?rev=300947&view=rev
Log:
[MSSA] Clean up the updater a bit. NFC
- Mark an internal function static
- Remove the llvm namespace (just holding on to the `using namespace
llvm;` Works on My Machine(TM))
Modified:
llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp
Modified: llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp?rev=300947&r1=300946&r2=300947&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp (original)
+++ llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp Thu Apr 20 23:54:52 2017
@@ -29,7 +29,7 @@
#define DEBUG_TYPE "memoryssa"
using namespace llvm;
-namespace llvm {
+
// This is the marker algorithm from "Simple and Efficient Construction of
// Static Single Assignment Form"
// The simple, non-marker algorithm places phi nodes at any join
@@ -211,8 +211,8 @@ void MemorySSAUpdater::insertUse(MemoryU
}
// Set every incoming edge {BB, MP->getBlock()} of MemoryPhi MP to NewDef.
-void setMemoryPhiValueForBlock(MemoryPhi *MP, const BasicBlock *BB,
- MemoryAccess *NewDef) {
+static void setMemoryPhiValueForBlock(MemoryPhi *MP, const BasicBlock *BB,
+ MemoryAccess *NewDef) {
// Replace any operand with us an incoming block with the new defining
// access.
int i = MP->getBasicBlockIndex(BB);
@@ -415,6 +415,7 @@ static MemoryAccess *onlySingleValue(Mem
}
return MA;
}
+
void MemorySSAUpdater::removeMemoryAccess(MemoryAccess *MA) {
assert(!MSSA->isLiveOnEntryDef(MA) &&
"Trying to remove the live on entry def");
@@ -490,5 +491,3 @@ MemoryUseOrDef *MemorySSAUpdater::create
++InsertPt->getIterator());
return NewAccess;
}
-
-} // namespace llvm
More information about the llvm-commits
mailing list