diff --git a/lib/Transforms/Scalar/GVNPRE.cpp b/lib/Transforms/Scalar/GVNPRE.cpp index 80f745f333b..e56be31ba69 100644 --- a/lib/Transforms/Scalar/GVNPRE.cpp +++ b/lib/Transforms/Scalar/GVNPRE.cpp @@ -156,8 +156,13 @@ namespace { namespace llvm { template <> struct DenseMapKeyInfo { - static inline Expression getEmptyKey() { return Expression(Expression::EMPTY); } - static inline Expression getTombstoneKey() { return Expression(Expression::TOMBSTONE); } + static inline Expression getEmptyKey() { + return Expression(Expression::EMPTY); + } + + static inline Expression getTombstoneKey() { + return Expression(Expression::TOMBSTONE); + } static unsigned getHashValue(const Expression e) { unsigned hash = e.opcode; @@ -170,8 +175,8 @@ template <> struct DenseMapKeyInfo { (unsigned)((uintptr_t)e.type >> 9) + hash * 37; - for (SmallVector::const_iterator I = e.varargs.begin(), E = e.varargs.end(); - I != E; ++I) + for (SmallVector::const_iterator I = e.varargs.begin(), + E = e.varargs.end(); I != E; ++I) hash = *I + hash * 37; return hash; @@ -723,7 +728,7 @@ namespace { FunctionPass *llvm::createGVNPREPass() { return new GVNPRE(); } static RegisterPass X("gvnpre", - "Global Value Numbering/Partial Redundancy Elimination"); + "Global Value Numbering/Partial Redundancy Elimination"); STATISTIC(NumInsertedVals, "Number of values inserted"); @@ -1223,7 +1228,8 @@ bool GVNPRE::elimination() { isa(BI) || isa(BI) || isa(BI) || isa(BI)) { - if (availableOut[BB].test(VN.lookup(BI)) && !availableOut[BB].count(BI)) { + if (availableOut[BB].test(VN.lookup(BI)) && + !availableOut[BB].count(BI)) { Value *leader = find_leader(availableOut[BB], VN.lookup(BI)); if (Instruction* Instr = dyn_cast(leader)) if (Instr->getParent() != 0 && Instr != BI) { @@ -1243,8 +1249,8 @@ bool GVNPRE::elimination() { changed_function = true; } - for (SmallVector::iterator I = erase.begin(), E = erase.end(); - I != E; ++I) + for (SmallVector::iterator I = erase.begin(), + E = erase.end(); I != E; ++I) (*I)->eraseFromParent(); return changed_function;