1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Finegrainify namespacification

Fix regressions ScalarRepl/basictest.ll & arraytest.ll

llvm-svn: 10287
This commit is contained in:
Chris Lattner 2003-12-02 17:43:55 +00:00
parent dba80bde3c
commit 0d57e06a37

View File

@ -32,8 +32,7 @@
#include "Support/Debug.h"
#include "Support/Statistic.h"
#include "Support/StringExtras.h"
namespace llvm {
using namespace llvm;
namespace {
Statistic<> NumReplaced("scalarrepl", "Number of allocas broken up");
@ -65,7 +64,7 @@ namespace {
}
// Public interface to the ScalarReplAggregates pass
Pass *createScalarReplAggregatesPass() { return new SROA(); }
Pass *llvm::createScalarReplAggregatesPass() { return new SROA(); }
bool SROA::runOnFunction(Function &F) {
@ -234,7 +233,7 @@ bool SROA::isSafeUseOfAllocation(Instruction *User) {
return false;
++I;
if (I != E || !isa<ConstantInt>(I.getOperand()))
if (I == E || !isa<ConstantInt>(I.getOperand()))
return false;
// If this is a use of an array allocation, do a bit more checking for sanity.
@ -301,5 +300,3 @@ bool SROA::isSafeAllocaToPromote(AllocationInst *AI) {
}
return true;
}
} // End llvm namespace