mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
Finegrainify namespacification
Fix regressions ScalarRepl/basictest.ll & arraytest.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10287 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -32,8 +32,7 @@
|
|||||||
#include "Support/Debug.h"
|
#include "Support/Debug.h"
|
||||||
#include "Support/Statistic.h"
|
#include "Support/Statistic.h"
|
||||||
#include "Support/StringExtras.h"
|
#include "Support/StringExtras.h"
|
||||||
|
using namespace llvm;
|
||||||
namespace llvm {
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
Statistic<> NumReplaced("scalarrepl", "Number of allocas broken up");
|
Statistic<> NumReplaced("scalarrepl", "Number of allocas broken up");
|
||||||
@@ -65,7 +64,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Public interface to the ScalarReplAggregates pass
|
// Public interface to the ScalarReplAggregates pass
|
||||||
Pass *createScalarReplAggregatesPass() { return new SROA(); }
|
Pass *llvm::createScalarReplAggregatesPass() { return new SROA(); }
|
||||||
|
|
||||||
|
|
||||||
bool SROA::runOnFunction(Function &F) {
|
bool SROA::runOnFunction(Function &F) {
|
||||||
@@ -234,7 +233,7 @@ bool SROA::isSafeUseOfAllocation(Instruction *User) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
++I;
|
++I;
|
||||||
if (I != E || !isa<ConstantInt>(I.getOperand()))
|
if (I == E || !isa<ConstantInt>(I.getOperand()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If this is a use of an array allocation, do a bit more checking for sanity.
|
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End llvm namespace
|
|
||||||
|
Reference in New Issue
Block a user