aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-01-09 06:12:26 +0000
committerChris Lattner <sabre@nondot.org>2004-01-09 06:12:26 +0000
commitdf3c342a4c254870b63709c7268a575a75e2bafc (patch)
tree4fd749cc0f01b7cdb2ace80a8c1bcb6d79eed510 /llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
parentfdf788eebdd1545969aa1b61ac95f79511cb0086 (diff)
downloadllvm-df3c342a4c254870b63709c7268a575a75e2bafc.zip
llvm-df3c342a4c254870b63709c7268a575a75e2bafc.tar.gz
llvm-df3c342a4c254870b63709c7268a575a75e2bafc.tar.bz2
Finegrainify namespacification
llvm-svn: 10727
Diffstat (limited to 'llvm/lib/Transforms/Utils/DemoteRegToStack.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/DemoteRegToStack.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp b/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
index e35dca4..ec0b091 100644
--- a/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
+++ b/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
@@ -21,16 +21,15 @@
#include "llvm/iTerminators.h"
#include "llvm/Type.h"
#include "Support/hash_set"
-
-namespace llvm {
+using namespace llvm;
typedef hash_set<PHINode*> PhiSet;
typedef hash_set<PHINode*>::iterator PhiSetIterator;
// Helper function to push a phi *and* all its operands to the worklist!
// Do not push an instruction if it is already in the result set of Phis to go.
-inline void PushOperandsOnWorkList(std::vector<Instruction*>& workList,
- PhiSet& phisToGo, PHINode* phiN) {
+static inline void PushOperandsOnWorkList(std::vector<Instruction*>& workList,
+ PhiSet& phisToGo, PHINode* phiN) {
for (User::op_iterator OI = phiN->op_begin(), OE = phiN->op_end();
OI != OE; ++OI) {
Instruction* opI = cast<Instruction>(OI);
@@ -133,7 +132,7 @@ static void AddLoadsAndStores(AllocaInst* XSlot, Instruction& X,
//
// Returns the pointer to the alloca inserted to create a stack slot for X.
//
-AllocaInst* DemoteRegToStack(Instruction& X) {
+AllocaInst* llvm::DemoteRegToStack(Instruction& X) {
if (X.getType() == Type::VoidTy)
return 0; // nothing to do!
@@ -162,5 +161,3 @@ AllocaInst* DemoteRegToStack(Instruction& X) {
return XSlot;
}
-
-} // End llvm namespace