mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
Fix 80 col. violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40750 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
666f6fe0ce
commit
830db6a00e
@ -146,8 +146,13 @@ namespace {
|
|||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
template <> struct DenseMapKeyInfo<Expression> {
|
template <> struct DenseMapKeyInfo<Expression> {
|
||||||
static inline Expression getEmptyKey() { return Expression(Expression::EMPTY); }
|
static inline Expression getEmptyKey() {
|
||||||
static inline Expression getTombstoneKey() { return Expression(Expression::TOMBSTONE); }
|
return Expression(Expression::EMPTY);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline Expression getTombstoneKey() {
|
||||||
|
return Expression(Expression::TOMBSTONE);
|
||||||
|
}
|
||||||
|
|
||||||
static unsigned getHashValue(const Expression e) {
|
static unsigned getHashValue(const Expression e) {
|
||||||
unsigned hash = e.opcode;
|
unsigned hash = e.opcode;
|
||||||
@ -160,8 +165,8 @@ template <> struct DenseMapKeyInfo<Expression> {
|
|||||||
(unsigned)((uintptr_t)e.type >> 9) +
|
(unsigned)((uintptr_t)e.type >> 9) +
|
||||||
hash * 37;
|
hash * 37;
|
||||||
|
|
||||||
for (SmallVector<uint32_t, 4>::const_iterator I = e.varargs.begin(), E = e.varargs.end();
|
for (SmallVector<uint32_t, 4>::const_iterator I = e.varargs.begin(),
|
||||||
I != E; ++I)
|
E = e.varargs.end(); I != E; ++I)
|
||||||
hash = *I + hash * 37;
|
hash = *I + hash * 37;
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
@ -656,7 +661,8 @@ namespace {
|
|||||||
ValueNumberedSet& currAvail,
|
ValueNumberedSet& currAvail,
|
||||||
DenseMap<Value*, LoadInst*>& lastSeenLoad,
|
DenseMap<Value*, LoadInst*>& lastSeenLoad,
|
||||||
SmallVector<Instruction*, 4>& toErase);
|
SmallVector<Instruction*, 4>& toErase);
|
||||||
bool processNonLocalLoad(LoadInst* L, SmallVector<Instruction*, 4>& toErase);
|
bool processNonLocalLoad(LoadInst* L,
|
||||||
|
SmallVector<Instruction*, 4>& toErase);
|
||||||
Value *GetValueForBlock(BasicBlock *BB, LoadInst* orig,
|
Value *GetValueForBlock(BasicBlock *BB, LoadInst* orig,
|
||||||
DenseMap<BasicBlock*, Value*> &Phis,
|
DenseMap<BasicBlock*, Value*> &Phis,
|
||||||
bool top_level = false);
|
bool top_level = false);
|
||||||
@ -773,7 +779,8 @@ Value *GVN::GetValueForBlock(BasicBlock *BB, LoadInst* orig,
|
|||||||
return PN;
|
return PN;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GVN::processNonLocalLoad(LoadInst* L, SmallVector<Instruction*, 4>& toErase) {
|
bool GVN::processNonLocalLoad(LoadInst* L,
|
||||||
|
SmallVector<Instruction*, 4>& toErase) {
|
||||||
MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>();
|
MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>();
|
||||||
|
|
||||||
DenseMap<BasicBlock*, Value*> deps;
|
DenseMap<BasicBlock*, Value*> deps;
|
||||||
@ -929,7 +936,8 @@ bool GVN::runOnFunction(Function &F) {
|
|||||||
|
|
||||||
for (BasicBlock::iterator BI = BB->begin(), BE = BB->end();
|
for (BasicBlock::iterator BI = BB->begin(), BE = BB->end();
|
||||||
BI != BE; ) {
|
BI != BE; ) {
|
||||||
changed_function |= processInstruction(BI, currAvail, lastSeenLoad, toErase);
|
changed_function |= processInstruction(BI, currAvail,
|
||||||
|
lastSeenLoad, toErase);
|
||||||
|
|
||||||
NumGVNInstr += toErase.size();
|
NumGVNInstr += toErase.size();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user