From: Owen Anderson Date: Thu, 2 Aug 2007 18:11:11 +0000 (+0000) Subject: Fix 80 col. violations. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=666f6fe0ce93b8ac2f810ec2c171710834ac7185;p=oota-llvm.git Fix 80 col. violations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40749 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index 0b26a5b65e3..0ac33a0cca5 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -1,4 +1,4 @@ -//===- DeadStoreElimination.cpp - Fast Dead Store Elimination --------------===// +//===- DeadStoreElimination.cpp - Fast Dead Store Elimination -------------===// // // The LLVM Compiler Infrastructure // @@ -47,8 +47,9 @@ namespace { } bool runOnBasicBlock(BasicBlock &BB); - bool handleFreeWithNonTrivialDependency(FreeInst* F, Instruction* dependency, - SetVector& possiblyDead); + bool handleFreeWithNonTrivialDependency(FreeInst* F, + Instruction* dependency, + SetVector& possiblyDead); bool handleEndBlock(BasicBlock& BB, SetVector& possiblyDead); bool RemoveUndeadPointers(Value* pointer, unsigned pointerSize, BasicBlock::iterator& BBI, @@ -57,7 +58,8 @@ namespace { void DeleteDeadInstructionChains(Instruction *I, SetVector &DeadInsts); void TranslatePointerBitCasts(Value*& v) { - assert(isa(v->getType()) && "Translating a non-pointer type?"); + assert(isa(v->getType()) && + "Translating a non-pointer type?"); // See through pointer-to-pointer bitcasts while (isa(v) || isa(v)) @@ -95,7 +97,8 @@ bool DSE::runOnBasicBlock(BasicBlock &BB) { bool MadeChange = false; // Do a top-down walk on the BB - for (BasicBlock::iterator BBI = BB.begin(), BBE = BB.end(); BBI != BBE; ++BBI) { + for (BasicBlock::iterator BBI = BB.begin(), BBE = BB.end(); + BBI != BBE; ++BBI) { // If we find a store or a free... if (isa(BBI) || isa(BBI)) { Value* pointer = 0; @@ -144,7 +147,8 @@ bool DSE::runOnBasicBlock(BasicBlock &BB) { // Handle frees whose dependencies are non-trivial if (FreeInst* F = dyn_cast(BBI)) if (!deletedStore) - MadeChange |= handleFreeWithNonTrivialDependency(F, MD.getDependency(F), + MadeChange |= handleFreeWithNonTrivialDependency(F, + MD.getDependency(F), possiblyDead); // Update our most-recent-store map @@ -173,7 +177,7 @@ bool DSE::runOnBasicBlock(BasicBlock &BB) { /// handleFreeWithNonTrivialDependency - Handle frees of entire structures whose /// dependency is a store to a field of that structure bool DSE::handleFreeWithNonTrivialDependency(FreeInst* F, Instruction* dep, - SetVector& possiblyDead) { + SetVector& possiblyDead) { TargetData &TD = getAnalysis(); AliasAnalysis &AA = getAnalysis(); MemoryDependenceAnalysis& MD = getAnalysis(); @@ -187,7 +191,8 @@ bool DSE::handleFreeWithNonTrivialDependency(FreeInst* F, Instruction* dep, return false; Value* depPointer = dependency->getPointerOperand(); - unsigned depPointerSize = TD.getTypeSize(dependency->getOperand(0)->getType()); + const Type* depType = dependency->getOperand(0)->getType(); + unsigned depPointerSize = TD.getTypeSize(depType); // Check for aliasing AliasAnalysis::AliasResult A = AA.alias(F->getPointerOperand(), ~0UL, @@ -211,9 +216,10 @@ bool DSE::handleFreeWithNonTrivialDependency(FreeInst* F, Instruction* dep, return false; } -/// handleEndBlock - Remove dead stores to stack-allocated locations in the function -/// end block -bool DSE::handleEndBlock(BasicBlock& BB, SetVector& possiblyDead) { +/// handleEndBlock - Remove dead stores to stack-allocated locations in the +/// function end block +bool DSE::handleEndBlock(BasicBlock& BB, + SetVector& possiblyDead) { TargetData &TD = getAnalysis(); AliasAnalysis &AA = getAnalysis(); MemoryDependenceAnalysis& MD = getAnalysis(); @@ -282,7 +288,8 @@ bool DSE::handleEndBlock(BasicBlock& BB, SetVector& possiblyDead) // Get size information for the alloca unsigned pointerSize = ~0UL; if (ConstantInt* C = dyn_cast((*I)->getArraySize())) - pointerSize = C->getZExtValue() * TD.getTypeSize((*I)->getAllocatedType()); + pointerSize = C->getZExtValue() * \ + TD.getTypeSize((*I)->getAllocatedType()); // See if the call site touches it AliasAnalysis::ModRefResult A = AA.getModRefInfo(CallSite::get(BBI), @@ -326,10 +333,12 @@ bool DSE::RemoveUndeadPointers(Value* killPointer, unsigned killPointerSize, // Get size information for the alloca unsigned pointerSize = ~0UL; if (ConstantInt* C = dyn_cast((*I)->getArraySize())) - pointerSize = C->getZExtValue() * TD.getTypeSize((*I)->getAllocatedType()); + pointerSize = C->getZExtValue() * \ + TD.getTypeSize((*I)->getAllocatedType()); // See if this pointer could alias it - AliasAnalysis::AliasResult A = AA.alias(*I, pointerSize, killPointer, killPointerSize); + AliasAnalysis::AliasResult A = AA.alias(*I, pointerSize, + killPointer, killPointerSize); // If it must-alias and a store, we can delete it if (isa(BBI) && A == AliasAnalysis::MustAlias) {