[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))


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
George Burgess IV 2017-04-21 04:54:52 +00:00
parent 1b5b740e23
commit 67bc67ffea

View File

@ -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(MemoryUse *MU) {
}
// 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(MemoryPhi *MP) {
}
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::createMemoryAccessAfter(
++InsertPt->getIterator());
return NewAccess;
}
} // namespace llvm