diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2007-04-16 18:10:23 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2007-04-16 18:10:23 +0000 |
commit | bed2946a96ecb15b0b636fa74cb26ce61b1c648e (patch) | |
tree | 52a39df658d308bd7dfb4f04479139d23c149c73 /lib/Transforms | |
parent | 892299ccf41e9b3726b1a9f297e47ce636b197ca (diff) | |
download | llvm-bed2946a96ecb15b0b636fa74cb26ce61b1c648e.tar.gz llvm-bed2946a96ecb15b0b636fa74cb26ce61b1c648e.tar.bz2 llvm-bed2946a96ecb15b0b636fa74cb26ce61b1c648e.tar.xz |
Removed tabs everywhere except autogenerated & external files. Add make
target for tabs checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/IndMemRemoval.cpp | 8 | ||||
-rw-r--r-- | lib/Transforms/IPO/Internalize.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/RSProfiling.cpp | 37 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LowerPacked.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/Reg2Mem.cpp | 8 | ||||
-rw-r--r-- | lib/Transforms/Utils/CodeExtractor.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerAllocations.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerSelect.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerSwitch.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/Mem2Reg.cpp | 2 |
11 files changed, 35 insertions, 34 deletions
diff --git a/lib/Transforms/IPO/IndMemRemoval.cpp b/lib/Transforms/IPO/IndMemRemoval.cpp index 6c80aca148..eeddad71a9 100644 --- a/lib/Transforms/IPO/IndMemRemoval.cpp +++ b/lib/Transforms/IPO/IndMemRemoval.cpp @@ -49,8 +49,8 @@ bool IndMemRemPass::runOnModule(Module &M) { assert(F->isDeclaration() && "free not external?"); if (!F->use_empty()) { Function* FN = new Function(F->getFunctionType(), - GlobalValue::LinkOnceLinkage, - "free_llvm_bounce", &M); + GlobalValue::LinkOnceLinkage, + "free_llvm_bounce", &M); BasicBlock* bb = new BasicBlock("entry",FN); Instruction* R = new ReturnInst(bb); new FreeInst(FN->arg_begin(), R); @@ -64,8 +64,8 @@ bool IndMemRemPass::runOnModule(Module &M) { assert(F->isDeclaration() && "malloc not external?"); if (!F->use_empty()) { Function* FN = new Function(F->getFunctionType(), - GlobalValue::LinkOnceLinkage, - "malloc_llvm_bounce", &M); + GlobalValue::LinkOnceLinkage, + "malloc_llvm_bounce", &M); BasicBlock* bb = new BasicBlock("entry",FN); Instruction* c = CastInst::createIntegerCast( FN->arg_begin(), Type::Int32Ty, false, "c", bb); diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp index a1ebe956e5..46d80e592f 100644 --- a/lib/Transforms/IPO/Internalize.cpp +++ b/lib/Transforms/IPO/Internalize.cpp @@ -68,7 +68,7 @@ InternalizePass::InternalizePass(bool InternalizeEverything) InternalizePass::InternalizePass(const std::vector<const char *>&exportList) : DontInternalize(false){ for(std::vector<const char *>::const_iterator itr = exportList.begin(); - itr != exportList.end(); itr++) { + itr != exportList.end(); itr++) { ExternalNames.insert(*itr); } } diff --git a/lib/Transforms/Instrumentation/RSProfiling.cpp b/lib/Transforms/Instrumentation/RSProfiling.cpp index 2b3adb27cd..7e34786edf 100644 --- a/lib/Transforms/Instrumentation/RSProfiling.cpp +++ b/lib/Transforms/Instrumentation/RSProfiling.cpp @@ -60,7 +60,7 @@ namespace { cl::values( clEnumValN(GBV, "global", "global counter"), clEnumValN(GBVO, "ra_global", - "register allocated global counter"), + "register allocated global counter"), clEnumValN(HOSTCC, "rdcc", "cycle counter"), clEnumValEnd)); @@ -82,7 +82,7 @@ namespace { static RegisterAnalysisGroup<RSProfilers> A("Profiling passes"); static RegisterPass<NullProfilerRS> NP("insert-null-profiling-rs", - "Measure profiling framework overhead"); + "Measure profiling framework overhead"); static RegisterAnalysisGroup<RSProfilers, true> NPT(NP); /// Chooser - Something that chooses when to make a sample of the profiled code @@ -155,7 +155,7 @@ namespace { }; RegisterPass<ProfilerRS> X("insert-rs-profiling-framework", - "Insert random sampling instrumentation framework"); + "Insert random sampling instrumentation framework"); } //Local utilities @@ -202,14 +202,14 @@ void GlobalRandomCounter::ProcessChoicePoint(BasicBlock* bb) { "countercc", t); Value* nv = BinaryOperator::createSub(l, ConstantInt::get(T, 1), - "counternew", t); + "counternew", t); new StoreInst(nv, Counter, t); t->setCondition(s); //reset counter BasicBlock* oldnext = t->getSuccessor(0); BasicBlock* resetblock = new BasicBlock("reset", oldnext->getParent(), - oldnext); + oldnext); TerminatorInst* t2 = new BranchInst(oldnext, resetblock); t->setSuccessor(0, resetblock); new StoreInst(ResetValue, Counter, t2); @@ -275,14 +275,14 @@ void GlobalRandomCounterOpt::ProcessChoicePoint(BasicBlock* bb) { "countercc", t); Value* nv = BinaryOperator::createSub(l, ConstantInt::get(T, 1), - "counternew", t); + "counternew", t); new StoreInst(nv, AI, t); t->setCondition(s); //reset counter BasicBlock* oldnext = t->getSuccessor(0); BasicBlock* resetblock = new BasicBlock("reset", oldnext->getParent(), - oldnext); + oldnext); TerminatorInst* t2 = new BranchInst(oldnext, resetblock); t->setSuccessor(0, resetblock); new StoreInst(ResetValue, AI, t2); @@ -304,7 +304,7 @@ void CycleCounter::ProcessChoicePoint(BasicBlock* bb) { CallInst* c = new CallInst(F, "rdcc", t); BinaryOperator* b = BinaryOperator::createAnd(c, ConstantInt::get(Type::Int64Ty, rm), - "mrdcc", t); + "mrdcc", t); ICmpInst *s = new ICmpInst(ICmpInst::ICMP_EQ, b, ConstantInt::get(Type::Int64Ty, 0), @@ -342,8 +342,8 @@ void RSProfilers_std::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNu Value *OldVal = new LoadInst(ElementPtr, "OldCounter", InsertPos); profcode.insert(OldVal); Value *NewVal = BinaryOperator::createAdd(OldVal, - ConstantInt::get(Type::Int32Ty, 1), - "NewCounter", InsertPos); + ConstantInt::get(Type::Int32Ty, 1), + "NewCounter", InsertPos); profcode.insert(NewVal); profcode.insert(new StoreInst(NewVal, ElementPtr, InsertPos)); } @@ -366,7 +366,7 @@ Value* ProfilerRS::Translate(Value* v) { TransCache[bb] = bb; //don't translate entry block else TransCache[bb] = new BasicBlock("dup_" + bb->getName(), bb->getParent(), - NULL); + NULL); return TransCache[bb]; } else if (Instruction* i = dyn_cast<Instruction>(v)) { //we have already translated this @@ -462,7 +462,7 @@ void ProfilerRS::ProcessBackEdge(BasicBlock* src, BasicBlock* dst, Function& F) //b: new BranchInst(cast<BasicBlock>(Translate(dst)), bbC); new BranchInst(dst, cast<BasicBlock>(Translate(dst)), - ConstantInt::get(Type::Int1Ty, true), bbCp); + ConstantInt::get(Type::Int1Ty, true), bbCp); //c: { TerminatorInst* iB = src->getTerminator(); @@ -484,7 +484,7 @@ void ProfilerRS::ProcessBackEdge(BasicBlock* src, BasicBlock* dst, Function& F) CollapsePhi(dst, bbC); //f: ReplacePhiPred(cast<BasicBlock>(Translate(dst)), - cast<BasicBlock>(Translate(src)),bbCp); + cast<BasicBlock>(Translate(src)),bbCp); CollapsePhi(cast<BasicBlock>(Translate(dst)), bbCp); //g: for(BasicBlock::iterator ib = dst->begin(), ie = dst->end(); ib != ie; @@ -494,7 +494,7 @@ void ProfilerRS::ProcessBackEdge(BasicBlock* src, BasicBlock* dst, Function& F) if(bbC == phi->getIncomingBlock(x)) { phi->addIncoming(Translate(phi->getIncomingValue(x)), bbCp); cast<PHINode>(Translate(phi))->addIncoming(phi->getIncomingValue(x), - bbC); + bbC); } phi->removeIncomingValue(bbC); } @@ -510,15 +510,16 @@ bool ProfilerRS::runOnFunction(Function& F) { //assume that stuff worked. now connect the duplicated basic blocks //with the originals in such a way as to preserve ssa. yuk! for (std::set<std::pair<BasicBlock*, BasicBlock*> >::iterator - ib = BackEdges.begin(), ie = BackEdges.end(); ib != ie; ++ib) + ib = BackEdges.begin(), ie = BackEdges.end(); ib != ie; ++ib) ProcessBackEdge(ib->first, ib->second, F); //oh, and add the edge from the reg2mem created entry node to the //duplicated second node TerminatorInst* T = F.getEntryBlock().getTerminator(); ReplaceInstWithInst(T, new BranchInst(T->getSuccessor(0), - cast<BasicBlock>(Translate(T->getSuccessor(0))), - ConstantInt::get(Type::Int1Ty, true))); + cast<BasicBlock>( + Translate(T->getSuccessor(0))), + ConstantInt::get(Type::Int1Ty, true))); //do whatever is needed now that the function is duplicated c->PrepFunction(&F); @@ -527,7 +528,7 @@ bool ProfilerRS::runOnFunction(Function& F) { ChoicePoints.insert(&F.getEntryBlock()); for (std::set<BasicBlock*>::iterator - ii = ChoicePoints.begin(), ie = ChoicePoints.end(); ii != ie; ++ii) + ii = ChoicePoints.begin(), ie = ChoicePoints.end(); ii != ie; ++ii) c->ProcessChoicePoint(*ii); ChoicePoints.clear(); diff --git a/lib/Transforms/Scalar/LowerPacked.cpp b/lib/Transforms/Scalar/LowerPacked.cpp index 4e1d280b1e..10a5e60a86 100644 --- a/lib/Transforms/Scalar/LowerPacked.cpp +++ b/lib/Transforms/Scalar/LowerPacked.cpp @@ -379,7 +379,7 @@ void LowerPacked::visitExtractElementInst(ExtractElementInst& EI) new AllocaInst(PTy->getElementType(), ConstantInt::get(Type::Int32Ty, PTy->getNumElements()), EI.getName() + ".alloca", - EI.getParent()->getParent()->getEntryBlock().begin()); + EI.getParent()->getParent()->getEntryBlock().begin()); for (unsigned i = 0; i < PTy->getNumElements(); ++i) { GetElementPtrInst *GEP = new GetElementPtrInst(alloca, ConstantInt::get(Type::Int32Ty, i), diff --git a/lib/Transforms/Scalar/Reg2Mem.cpp b/lib/Transforms/Scalar/Reg2Mem.cpp index e1eab65bd4..e013cedb0d 100644 --- a/lib/Transforms/Scalar/Reg2Mem.cpp +++ b/lib/Transforms/Scalar/Reg2Mem.cpp @@ -44,7 +44,7 @@ namespace { for(Value::use_iterator ii = i->use_begin(), ie = i->use_end(); ii != ie; ++ii) if (cast<Instruction>(*ii)->getParent() != bb || - isa<PHINode>(*ii)) + isa<PHINode>(*ii)) return true; return false; } @@ -52,9 +52,9 @@ namespace { virtual bool runOnFunction(Function &F) { if (!F.isDeclaration()) { //give us a clean block - BasicBlock* bbold = &F.getEntryBlock(); - BasicBlock* bbnew = new BasicBlock("allocablock", &F, &F.getEntryBlock()); - new BranchInst(bbold, bbnew); + BasicBlock* bbold = &F.getEntryBlock(); + BasicBlock* bbnew = new BasicBlock("allocablock", &F, &F.getEntryBlock()); + new BranchInst(bbold, bbnew); //find the instructions std::list<Instruction*> worklist; diff --git a/lib/Transforms/Utils/CodeExtractor.cpp b/lib/Transforms/Utils/CodeExtractor.cpp index 6ad7c2a899..656e6dcc00 100644 --- a/lib/Transforms/Utils/CodeExtractor.cpp +++ b/lib/Transforms/Utils/CodeExtractor.cpp @@ -151,7 +151,7 @@ void CodeExtractor::severSplitPHINodes(BasicBlock *&Header) { for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) if (DT->getNode(I)->getIDom()->getBlock() == OldPred) { DT->changeImmediateDominator(DT->getNode(I), DT->getNode(NewBB)); - EF->setImmediateDominator(I, NewBB); + EF->setImmediateDominator(I, NewBB); } } diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 8acaeed26b..cb2f88558e 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -43,7 +43,7 @@ namespace { AU.addRequired<TargetData>(); AU.setPreservesCFG(); - // This is a cluster of orthogonal Transforms: + // This is a cluster of orthogonal Transforms: AU.addPreserved<UnifyFunctionExitNodes>(); AU.addPreservedID(PromoteMemoryToRegisterID); AU.addPreservedID(LowerSelectID); diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index e1712bce43..a1bd065df8 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -80,7 +80,7 @@ namespace { bool runOnFunction(Function &F); virtual void getAnalysisUsage(AnalysisUsage &AU) const { - // This is a cluster of orthogonal Transforms + // This is a cluster of orthogonal Transforms AU.addPreservedID(PromoteMemoryToRegisterID); AU.addPreservedID(LowerSelectID); AU.addPreservedID(LowerSwitchID); diff --git a/lib/Transforms/Utils/LowerSelect.cpp b/lib/Transforms/Utils/LowerSelect.cpp index 27e1866eaf..120c3b19c7 100644 --- a/lib/Transforms/Utils/LowerSelect.cpp +++ b/lib/Transforms/Utils/LowerSelect.cpp @@ -37,7 +37,7 @@ namespace { virtual void getAnalysisUsage(AnalysisUsage &AU) const { // This certainly destroys the CFG. - // This is a cluster of orthogonal Transforms: + // This is a cluster of orthogonal Transforms: AU.addPreserved<UnifyFunctionExitNodes>(); AU.addPreservedID(PromoteMemoryToRegisterID); AU.addPreservedID(LowerSwitchID); diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index 9e85974070..4a2dd9a9e0 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -33,7 +33,7 @@ namespace { virtual bool runOnFunction(Function &F); virtual void getAnalysisUsage(AnalysisUsage &AU) const { - // This is a cluster of orthogonal Transforms + // This is a cluster of orthogonal Transforms AU.addPreserved<UnifyFunctionExitNodes>(); AU.addPreservedID(PromoteMemoryToRegisterID); AU.addPreservedID(LowerSelectID); diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index 78117fb11e..6e2bcb08fe 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/lib/Transforms/Utils/Mem2Reg.cpp @@ -40,7 +40,7 @@ namespace { AU.addRequired<DominanceFrontier>(); AU.addRequired<TargetData>(); AU.setPreservesCFG(); - // This is a cluster of orthogonal Transforms + // This is a cluster of orthogonal Transforms AU.addPreserved<UnifyFunctionExitNodes>(); AU.addPreservedID(LowerSelectID); AU.addPreservedID(LowerSwitchID); |