diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-20 14:39:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-20 14:39:18 +0000 |
commit | 02a3be020a6b4eedb4b489959997d23a22cdf22e (patch) | |
tree | 39fec120d7a18969260d3b96afb29bdecbcf9155 /lib | |
parent | 894707117e718b38cdd5fbbf7b2d2ccfcbafe98b (diff) | |
download | external_llvm-02a3be020a6b4eedb4b489959997d23a22cdf22e.zip external_llvm-02a3be020a6b4eedb4b489959997d23a22cdf22e.tar.gz external_llvm-02a3be020a6b4eedb4b489959997d23a22cdf22e.tar.bz2 |
Rename Function::getEntryNode -> getEntryBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 2 | ||||
-rw-r--r-- | lib/Target/CBackend/Writer.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/LowerSetJmp.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/TraceValues.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Scalar/ADCE.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/CorrelatedExprs.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/ScalarReplAggregates.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Scalar/TailRecursionElimination.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/Mem2Reg.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/Dominators.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/Verifier.cpp | 7 |
12 files changed, 17 insertions, 16 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 65919e8..16d55fe 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -105,7 +105,7 @@ namespace { if (!AI) return false; if (AI->isArrayAllocation()) return 0; // FIXME: we can also inline fixed size array allocas! - if (AI->getParent() != &AI->getParent()->getParent()->getEntryNode()) + if (AI->getParent() != &AI->getParent()->getParent()->getEntryBlock()) return 0; return AI; } diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 65919e8..16d55fe 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -105,7 +105,7 @@ namespace { if (!AI) return false; if (AI->isArrayAllocation()) return 0; // FIXME: we can also inline fixed size array allocas! - if (AI->getParent() != &AI->getParent()->getParent()->getEntryNode()) + if (AI->getParent() != &AI->getParent()->getParent()->getEntryBlock()) return 0; return AI; } diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index fc9af5b..d6c02569 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -268,7 +268,7 @@ AllocaInst* LowerSetJmp::GetSetJmpMap(Function* Func) // Insert the setjmp map initialization before the first instruction in // the function. - Instruction* Inst = Func->getEntryNode().begin(); + Instruction* Inst = Func->getEntryBlock().begin(); assert(Inst && "Couldn't find even ONE instruction in entry block!"); // Fill in the alloca and call to initialize the SJ map. diff --git a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp index e94f0b7..aa46048 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp @@ -228,7 +228,7 @@ bool ProfilePaths::runOnFunction(Function &F){ // insert initialization code in first (entry) BB // this includes initializing r and count - insertInTopBB(&F.getEntryNode(),numPaths, rVar, threshold); + insertInTopBB(&F.getEntryBlock(), numPaths, rVar, threshold); //now process the graph: get path numbers, //get increments along different paths, diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp index 375a45d..4579972 100644 --- a/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/lib/Transforms/Instrumentation/TraceValues.cpp @@ -348,7 +348,7 @@ static void TraceValuesAtBBExit(BasicBlock *BB, static inline void InsertCodeToShowFunctionEntry(Function &F, Function *Printf, Function* HashPtrToSeqNum){ // Get an iterator to point to the insertion location - BasicBlock &BB = F.getEntryNode(); + BasicBlock &BB = F.getEntryBlock(); Instruction *InsertPos = BB.begin(); std::ostringstream OutStr; @@ -398,7 +398,7 @@ bool InsertTraceCode::runOnFunction(Function &F) { // Push a pointer set for recording alloca'd pointers at entry. if (!DisablePtrHashing) new CallInst(externalFuncs.PushOnEntryFunc, vector<Value*>(), "", - F.getEntryNode().begin()); + F.getEntryBlock().begin()); for (Function::iterator BB = F.begin(); BB != F.end(); ++BB) { if (isa<ReturnInst>(BB->getTerminator())) diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 897e209..8d71605 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -195,7 +195,7 @@ bool ADCE::doADCE() { // transformations safely. // PostDominatorTree &DT = getAnalysis<PostDominatorTree>(); - if (DT[&Func->getEntryNode()] == 0) { + if (DT[&Func->getEntryBlock()] == 0) { WorkList.clear(); return MadeChanges; } diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp index 545c256..6003c81 100644 --- a/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp @@ -291,7 +291,7 @@ bool CEE::runOnFunction(Function &F) { DT = &getAnalysis<DominatorTree>(); std::set<BasicBlock*> VisitedBlocks; - bool Changed = TransformRegion(&F.getEntryNode(), VisitedBlocks); + bool Changed = TransformRegion(&F.getEntryBlock(), VisitedBlocks); RegionInfoMap.clear(); RankMap.clear(); diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 2a6bddf..adcbaff 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -75,7 +75,7 @@ bool SROA::performPromotion(Function &F) { std::vector<AllocaInst*> Allocas; const TargetData &TD = getAnalysis<TargetData>(); - BasicBlock &BB = F.getEntryNode(); // Get the entry node for the function + BasicBlock &BB = F.getEntryBlock(); // Get the entry node for the function bool Changed = false; @@ -108,7 +108,7 @@ bool SROA::performScalarRepl(Function &F) { std::vector<AllocationInst*> WorkList; // Scan the entry basic block, adding any alloca's and mallocs to the worklist - BasicBlock &BB = F.getEntryNode(); + BasicBlock &BB = F.getEntryBlock(); for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ++I) if (AllocationInst *A = dyn_cast<AllocationInst>(I)) WorkList.push_back(A); diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index c8ac4c5..447c0ae 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -62,7 +62,7 @@ bool TailCallElim::runOnFunction(Function &F) { // Ok, so this is the first tail call we have found in this // function. Insert a new entry block into the function, allowing // us to branch back to the old entry block. - OldEntry = &F.getEntryNode(); + OldEntry = &F.getEntryBlock(); BasicBlock *NewEntry = new BasicBlock("tailrecurse", OldEntry); NewEntry->getInstList().push_back(new BranchInst(OldEntry)); diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index b731ab1..16d05d8 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/lib/Transforms/Utils/Mem2Reg.cpp @@ -38,7 +38,7 @@ bool PromotePass::runOnFunction(Function &F) { std::vector<AllocaInst*> Allocas; const TargetData &TD = getAnalysis<TargetData>(); - BasicBlock &BB = F.getEntryNode(); // Get the entry node for the function + BasicBlock &BB = F.getEntryBlock(); // Get the entry node for the function bool Changed = false; diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index f22bd0c..671b494 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -87,7 +87,7 @@ void DominatorSet::calculateDominatorsFromBlock(BasicBlock *RootBB) { // specified function. // bool DominatorSet::runOnFunction(Function &F) { - BasicBlock *Root = &F.getEntryNode(); + BasicBlock *Root = &F.getEntryBlock(); Roots.clear(); Roots.push_back(Root); assert(pred_begin(Root) == pred_end(Root) && diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index ace5775..51d378d 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -228,7 +228,7 @@ void Verifier::visitFunction(Function &F) { verifySymbolTable(F.getSymbolTable()); // Check the entry node - BasicBlock *Entry = &F.getEntryNode(); + BasicBlock *Entry = &F.getEntryBlock(); Assert1(pred_begin(Entry) == pred_end(Entry), "Entry block to function must not have predecessors!", Entry); } @@ -482,7 +482,7 @@ void Verifier::visitInstruction(Instruction &I) { // Use must be dominated by by definition unless use is unreachable! Assert2(DS->dominates(BB, Pred) || - !DS->dominates(&BB->getParent()->getEntryNode(), Pred), + !DS->dominates(&BB->getParent()->getEntryBlock(), Pred), "Instruction does not dominate all uses!", &I, PN); } @@ -490,7 +490,8 @@ void Verifier::visitInstruction(Instruction &I) { } else { // Use must be dominated by by definition unless use is unreachable! Assert2(DS->dominates(&I, Use) || - !DS->dominates(&BB->getParent()->getEntryNode(),Use->getParent()), + !DS->dominates(&BB->getParent()->getEntryBlock(), + Use->getParent()), "Instruction does not dominate all uses!", &I, Use); } } |