llvm.org GIT mirror llvm / b1dbcd8
Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51143 91177308-0d34-0410-b5e6-96231b3b80d8 Gabor Greif 11 years ago
23 changed file(s) with 134 addition(s) and 78 deletion(s). Raw diff Collapse all Expand all
17371737 endif
17381738
17391739 check-line-length:
1740 @egrep -n '.{81}' $(Sources)
1740 @echo searching for overlength lines in files: $(Sources)
1741 @echo
1742 @echo
1743 @egrep -n '.{81}' $(Sources) /dev/null
17411744
17421745 check-for-tabs:
1743 @egrep -n ' ' $(Sources)
1746 @echo searching for tabs in files: $(Sources)
1747 @echo
1748 @echo
1749 @egrep -n ' ' $(Sources) /dev/null
1750
17441751 check-footprint:
17451752 @ls -l $(LibDir) | awk '\
17461753 BEGIN { sum = 0; } \
277277 BasicBlock *bb_1 = BasicBlock::Create(label, brainf_func);
278278 builder->SetInsertPoint(bb_1);
279279
280 //Make part of PHI instruction now, wait until end of loop to finish
281 PHINode *phi_0 = PHINode::Create(PointerType::getUnqual(IntegerType::Int8Ty),
282 headreg, testbb);
280 // Make part of PHI instruction now, wait until end of loop to finish
281 PHINode *phi_0 =
282 PHINode::Create(PointerType::getUnqual(IntegerType::Int8Ty),
283 headreg, testbb);
283284 phi_0->reserveOperandSpace(2);
284285 phi_0->addIncoming(curhead, bb_0);
285286 curhead = phi_0;
27112711 PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
27122712
27132713 // Create the InvokeInst
2714 InvokeInst *II = InvokeInst::Create(V, Normal, Except, Args.begin(),Args.end());
2714 InvokeInst *II = InvokeInst::Create(V, Normal, Except,
2715 Args.begin(), Args.end());
27152716 II->setCallingConv($2);
27162717 II->setParamAttrs(PAL);
27172718 $$ = II;
14841484 }
14851485 }
14861486
1487 I = InvokeInst::Create(Callee, NormalBB, UnwindBB, Ops.begin(), Ops.end());
1487 I = InvokeInst::Create(Callee, NormalBB, UnwindBB,
1488 Ops.begin(), Ops.end());
14881489 cast(I)->setCallingConv(CCInfo);
14891490 cast(I)->setParamAttrs(PAL);
14901491 break;
264264 Args.push_back(C);
265265 }
266266
267 CallInst *TheCall = CallInst::Create(F, Args.begin(), Args.end(), "", StubBB);
267 CallInst *TheCall = CallInst::Create(F, Args.begin(), Args.end(),
268 "", StubBB);
268269 TheCall->setTailCall();
269270 if (TheCall->getType() != Type::VoidTy)
270 ReturnInst::Create(TheCall, StubBB); // Return result of the call.
271 ReturnInst::Create(TheCall, StubBB); // Return result of the call.
271272 else
272 ReturnInst::Create(StubBB); // Just return void.
273 ReturnInst::Create(StubBB); // Just return void.
273274
274275 // Finally, return the value returned by our nullary stub function.
275276 return runFunction(Stub, std::vector());
854854 // We have a definition of the same name but different type in the
855855 // source module. Copy the prototype to the destination and replace
856856 // uses of the destination's prototype with the new prototype.
857 Function *NewDF = Function::Create(SF->getFunctionType(), SF->getLinkage(),
857 Function *NewDF = Function::Create(SF->getFunctionType(),
858 SF->getLinkage(),
858859 SF->getName(), Dest);
859860 CopyGVAttributes(NewDF, SF);
860861
890891 } else if (!DF || SF->hasInternalLinkage() || DF->hasInternalLinkage()) {
891892 // Function does not already exist, simply insert an function signature
892893 // identical to SF into the dest module.
893 Function *NewDF = Function::Create(SF->getFunctionType(), SF->getLinkage(),
894 Function *NewDF = Function::Create(SF->getFunctionType(),
895 SF->getLinkage(),
894896 SF->getName(), Dest);
895897 CopyGVAttributes(NewDF, SF);
896898
10811081 GEPIdx.push_back(GEPI->getOperand(1));
10821082 GEPIdx.append(GEPI->op_begin()+3, GEPI->op_end());
10831083
1084 Value *NGEPI = GetElementPtrInst::Create(NewPtr, GEPIdx.begin(), GEPIdx.end(),
1084 Value *NGEPI = GetElementPtrInst::Create(NewPtr,
1085 GEPIdx.begin(), GEPIdx.end(),
10851086 GEPI->getName(), GEPI);
10861087 GEPI->replaceAllUsesWith(NGEPI);
10871088 GEPI->eraseFromParent();
380380 if (bb == &bb->getParent()->getEntryBlock())
381381 TransCache[bb] = bb; //don't translate entry block
382382 else
383 TransCache[bb] = BasicBlock::Create("dup_" + bb->getName(), bb->getParent(),
384 NULL);
383 TransCache[bb] = BasicBlock::Create("dup_" + bb->getName(),
384 bb->getParent(), NULL);
385385 return TransCache[bb];
386386 } else if (Instruction* i = dyn_cast(v)) {
387387 //we have already translated this
908908 Instruction* newVal = 0;
909909 if (ShuffleVectorInst* S = dyn_cast(U))
910910 newVal = new ShuffleVectorInst(newOp1, newOp2, newOp3,
911 S->getName()+".expr");
911 S->getName() + ".expr");
912912 else if (InsertElementInst* I = dyn_cast(U))
913913 newVal = InsertElementInst::Create(newOp1, newOp2, newOp3,
914 I->getName()+".expr");
914 I->getName() + ".expr");
915915 else if (SelectInst* I = dyn_cast(U))
916 newVal = SelectInst::Create(newOp1, newOp2, newOp3, I->getName()+".expr");
916 newVal = SelectInst::Create(newOp1, newOp2, newOp3,
917 I->getName() + ".expr");
917918
918919 uint32_t v = VN.lookup_or_add(newVal);
919920
83478347 if (AddOp != TI)
83488348 std::swap(NewTrueOp, NewFalseOp);
83498349 Instruction *NewSel =
8350 SelectInst::Create(CondVal, NewTrueOp,NewFalseOp,SI.getName()+".p");
8350 SelectInst::Create(CondVal, NewTrueOp,
8351 NewFalseOp, SI.getName() + ".p");
83518352
83528353 NewSel = InsertNewInstBefore(NewSel, SI);
83538354 return BinaryOperator::createAdd(SubOp->getOperand(0), NewSel);
83738374 if (OpToFold) {
83748375 Constant *C = GetSelectFoldableConstant(TVI);
83758376 Instruction *NewSel =
8376 SelectInst::Create(SI.getCondition(), TVI->getOperand(2-OpToFold), C);
8377 SelectInst::Create(SI.getCondition(),
8378 TVI->getOperand(2-OpToFold), C);
83778379 InsertNewInstBefore(NewSel, SI);
83788380 NewSel->takeName(TVI);
83798381 if (BinaryOperator *BO = dyn_cast(TVI))
83988400 if (OpToFold) {
83998401 Constant *C = GetSelectFoldableConstant(FVI);
84008402 Instruction *NewSel =
8401 SelectInst::Create(SI.getCondition(), C, FVI->getOperand(2-OpToFold));
8403 SelectInst::Create(SI.getCondition(), C,
8404 FVI->getOperand(2-OpToFold));
84028405 InsertNewInstBefore(NewSel, SI);
84038406 NewSel->takeName(FVI);
84048407 if (BinaryOperator *BO = dyn_cast(FVI))
87568759 }
87578760
87588761 // Insert this value into the result vector.
8759 Result = InsertElementInst::Create(Result, ExtractedElts[Idx], i, "tmp");
8762 Result = InsertElementInst::Create(Result, ExtractedElts[Idx],
8763 i, "tmp");
87608764 InsertNewInstBefore(cast(Result), CI);
87618765 }
87628766 return CastInst::create(Instruction::BitCast, Result, CI.getType());
90899093 Instruction *NC;
90909094 if (InvokeInst *II = dyn_cast(Caller)) {
90919095 NC = InvokeInst::Create(Callee, II->getNormalDest(), II->getUnwindDest(),
9092 Args.begin(), Args.end(), Caller->getName(), Caller);
9096 Args.begin(), Args.end(),
9097 Caller->getName(), Caller);
90939098 cast(NC)->setCallingConv(II->getCallingConv());
90949099 cast(NC)->setParamAttrs(NewCallerPAL);
90959100 } else {
93309335 Value *InRHS = FirstInst->getOperand(1);
93319336 PHINode *NewLHS = 0, *NewRHS = 0;
93329337 if (LHSVal == 0) {
9333 NewLHS = PHINode::Create(LHSType, FirstInst->getOperand(0)->getName()+".pn");
9338 NewLHS = PHINode::Create(LHSType,
9339 FirstInst->getOperand(0)->getName() + ".pn");
93349340 NewLHS->reserveOperandSpace(PN.getNumOperands()/2);
93359341 NewLHS->addIncoming(InLHS, PN.getIncomingBlock(0));
93369342 InsertNewInstBefore(NewLHS, PN);
93389344 }
93399345
93409346 if (RHSVal == 0) {
9341 NewRHS = PHINode::Create(RHSType, FirstInst->getOperand(1)->getName()+".pn");
9347 NewRHS = PHINode::Create(RHSType,
9348 FirstInst->getOperand(1)->getName() + ".pn");
93429349 NewRHS->reserveOperandSpace(PN.getNumOperands()/2);
93439350 NewRHS->addIncoming(InRHS, PN.getIncomingBlock(0));
93449351 InsertNewInstBefore(NewRHS, PN);
1086310870 cast(I->getOperand(0)->getType())->getAddressSpace();
1086410871 Value *Ptr = InsertBitCastBefore(I->getOperand(0),
1086510872 PointerType::get(EI.getType(), AS),EI);
10866 GetElementPtrInst *GEP =
10867 GetElementPtrInst::Create(Ptr, EI.getOperand(1), I->getName() + ".gep");
10873 GetElementPtrInst *GEP =
10874 GetElementPtrInst::Create(Ptr, EI.getOperand(1), I->getName()+".gep");
1086810875 InsertNewInstBefore(GEP, EI);
1086910876 return new LoadInst(GEP);
1087010877 }
470470 // Right now original pre-header has two successors, new header and
471471 // exit block. Insert new block between original pre-header and
472472 // new header such that loop's new pre-header has only one successor.
473 BasicBlock *NewPreHeader = BasicBlock::Create("bb.nph", OrigHeader->getParent(),
473 BasicBlock *NewPreHeader = BasicBlock::Create("bb.nph",
474 OrigHeader->getParent(),
474475 NewHeader);
475476 LoopInfo &LI = LPM.getAnalysis();
476477 if (Loop *PL = LI.getLoopFor(OrigPreHeader))
400400 Instruction *InsertPos = OldEntry->begin();
401401 for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end();
402402 I != E; ++I) {
403 PHINode *PN = PHINode::Create(I->getType(), I->getName()+".tr", InsertPos);
403 PHINode *PN = PHINode::Create(I->getType(),
404 I->getName() + ".tr", InsertPos);
404405 I->replaceAllUsesWith(PN); // Everyone use the PHI node now!
405406 PN->addIncoming(I, NewEntry);
406407 ArgumentPHIs.push_back(PN);
640640 Function *oldFunction = header->getParent();
641641
642642 // This takes place of the original loop
643 BasicBlock *codeReplacer = BasicBlock::Create("codeRepl", oldFunction, header);
643 BasicBlock *codeReplacer = BasicBlock::Create("codeRepl", oldFunction,
644 header);
644645
645646 // The new function needs a root node because other nodes can branch to the
646647 // head of the region, but the entry node of a function cannot have preds.
531531 GR->eraseFromParent();
532532 }
533533 } else {
534 PHINode *PHI = PHINode::Create(RTy, TheCall->getName(), AfterCallBB->begin());
534 PHINode *PHI = PHINode::Create(RTy, TheCall->getName(),
535 AfterCallBB->begin());
535536 PHIs.push_back(PHI);
536537 // Anything that used the result of the function call should now use the
537538 // PHI node as their operand.
280280
281281 // Otherwise, the idom is the loop, so we need to insert a PHI node. Do so
282282 // now, then get values to fill in the incoming values for the PHI.
283 PHINode *PN = PHINode::Create(OrigInst->getType(), OrigInst->getName()+".lcssa",
284 BBN->begin());
283 PHINode *PN = PHINode::Create(OrigInst->getType(),
284 OrigInst->getName() + ".lcssa", BBN->begin());
285285 PN->reserveOperandSpace(std::distance(pred_begin(BBN), pred_end(BBN)));
286286 V = PN;
287287
801801 AddPredecessorToBlock(NewSuccessors[i], Pred, BB);
802802
803803 // Now that the successors are updated, create the new Switch instruction.
804 SwitchInst *NewSI = SwitchInst::Create(CV, PredDefault, PredCases.size(), PTI);
804 SwitchInst *NewSI = SwitchInst::Create(CV, PredDefault,
805 PredCases.size(), PTI);
805806 for (unsigned i = 0, e = PredCases.size(); i != e; ++i)
806807 NewSI->addCase(PredCases[i].first, PredCases[i].second);
807808
19181919 if (!TrueWhenEqual) std::swap(DefaultBB, EdgeBB);
19191920
19201921 // Create the new switch instruction now.
1921 SwitchInst *New = SwitchInst::Create(CompVal, DefaultBB,Values.size(),BI);
1922 SwitchInst *New = SwitchInst::Create(CompVal, DefaultBB,
1923 Values.size(), BI);
19221924
19231925 // Add all of the 'cases' to the switch instruction.
19241926 for (unsigned i = 0, e = Values.size(); i != e; ++i)
538538 GetElementPtrConstantExpr(Constant *C, const std::vector &IdxList,
539539 const Type *DestTy);
540540 public:
541 static GetElementPtrConstantExpr *Create(Constant *C, const std::vector &IdxList,
541 static GetElementPtrConstantExpr *Create(Constant *C,
542 const std::vector&IdxList,
542543 const Type *DestTy) {
543 return new(IdxList.size() + 1) GetElementPtrConstantExpr(C, IdxList, DestTy);
544 return new(IdxList.size() + 1)
545 GetElementPtrConstantExpr(C, IdxList, DestTy);
544546 }
545547 /// Transparently provide more efficient getOperand methods.
546548 DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
19721974 Constant *ConstantExpr::getGetElementPtrTy(const Type *ReqTy, Constant *C,
19731975 Value* const *Idxs,
19741976 unsigned NumIdx) {
1975 assert(GetElementPtrInst::getIndexedType(C->getType(), Idxs, Idxs+NumIdx, true) &&
1976 "GEP indices invalid!");
1977 assert(GetElementPtrInst::getIndexedType(C->getType(),
1978 Idxs, Idxs+NumIdx, true)
1979 && "GEP indices invalid!");
19771980
19781981 if (Constant *FC = ConstantFoldGetElementPtr(C, (Constant**)Idxs, NumIdx))
19791982 return FC; // Fold a few common cases...
105105 /// it in its containing function.
106106 bool Argument::hasStructRetAttr() const {
107107 if (!isa(getType())) return false;
108 if (this != getParent()->arg_begin()) return false; // StructRet param must be first param
108 if (this != getParent()->arg_begin())
109 return false; // StructRet param must be first param
109110 return getParent()->paramHasAttr(1, ParamAttr::StructRet);
110111 }
111112
420420
421421 InvokeInst::InvokeInst(const InvokeInst &II)
422422 : TerminatorInst(II.getType(), Instruction::Invoke,
423 OperandTraits::op_end(this) - II.getNumOperands(),
423 OperandTraits::op_end(this)
424 - II.getNumOperands(),
424425 II.getNumOperands()) {
425426 setParamAttrs(II.getParamAttrs());
426427 SubclassData = II.SubclassData;
463464
464465 ReturnInst::ReturnInst(const ReturnInst &RI)
465466 : TerminatorInst(Type::VoidTy, Instruction::Ret,
466 OperandTraits::op_end(this) - RI.getNumOperands(),
467 OperandTraits::op_end(this)
468 - RI.getNumOperands(),
467469 RI.getNumOperands()) {
468470 unsigned N = RI.getNumOperands();
469471 if (N == 1)
996998
997999 GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI)
9981000 : Instruction(reinterpret_cast(GEPI.getType()), GetElementPtr,
999 OperandTraits::op_end(this) - GEPI.getNumOperands(),
1001 OperandTraits::op_end(this)
1002 - GEPI.getNumOperands(),
10001003 GEPI.getNumOperands()) {
10011004 Use *OL = OperandList;
10021005 Use *GEPIOL = GEPI.OperandList;
19751978 unsigned DestBits = DestTy->getPrimitiveSizeInBits(); // 0 for ptr/vector
19761979
19771980 // Run through the possibilities ...
1978 if (DestTy->isInteger()) { // Casting to integral
1979 if (SrcTy->isInteger()) { // Casting from integral
1981 if (DestTy->isInteger()) { // Casting to integral
1982 if (SrcTy->isInteger()) { // Casting from integral
19801983 return true;
1981 } else if (SrcTy->isFloatingPoint()) { // Casting from floating pt
1984 } else if (SrcTy->isFloatingPoint()) { // Casting from floating pt
19821985 return true;
19831986 } else if (const VectorType *PTy = dyn_cast(SrcTy)) {
1984 // Casting from vector
1987 // Casting from vector
19851988 return DestBits == PTy->getBitWidth();
1986 } else { // Casting from something else
1989 } else { // Casting from something else
19871990 return isa(SrcTy);
19881991 }
1989 } else if (DestTy->isFloatingPoint()) { // Casting to floating pt
1990 if (SrcTy->isInteger()) { // Casting from integral
1992 } else if (DestTy->isFloatingPoint()) { // Casting to floating pt
1993 if (SrcTy->isInteger()) { // Casting from integral
19911994 return true;
1992 } else if (SrcTy->isFloatingPoint()) { // Casting from floating pt
1995 } else if (SrcTy->isFloatingPoint()) { // Casting from floating pt
19931996 return true;
19941997 } else if (const VectorType *PTy = dyn_cast(SrcTy)) {
1995 // Casting from vector
1998 // Casting from vector
19961999 return DestBits == PTy->getBitWidth();
1997 } else { // Casting from something else
2000 } else { // Casting from something else
19982001 return false;
19992002 }
20002003 } else if (const VectorType *DestPTy = dyn_cast(DestTy)) {
2001 // Casting to vector
2004 // Casting to vector
20022005 if (const VectorType *SrcPTy = dyn_cast(SrcTy)) {
2003 // Casting from vector
2006 // Casting from vector
20042007 return DestPTy->getBitWidth() == SrcPTy->getBitWidth();
2005 } else { // Casting from something else
2008 } else { // Casting from something else
20062009 return DestPTy->getBitWidth() == SrcBits;
20072010 }
2008 } else if (isa(DestTy)) { // Casting to pointer
2009 if (isa(SrcTy)) { // Casting from pointer
2011 } else if (isa(DestTy)) { // Casting to pointer
2012 if (isa(SrcTy)) { // Casting from pointer
20102013 return true;
2011 } else if (SrcTy->isInteger()) { // Casting from integral
2014 } else if (SrcTy->isInteger()) { // Casting from integral
20122015 return true;
2013 } else { // Casting from something else
2016 } else { // Casting from something else
20142017 return false;
20152018 }
2016 } else { // Casting to something else
2019 } else { // Casting to something else
20172020 return false;
20182021 }
20192022 }
28052808 CastInst *PtrToIntInst::clone() const { return new PtrToIntInst(*this); }
28062809 CastInst *IntToPtrInst::clone() const { return new IntToPtrInst(*this); }
28072810 CastInst *BitCastInst::clone() const { return new BitCastInst(*this); }
2808 CallInst *CallInst::clone() const { return new(getNumOperands()) CallInst(*this); }
2809 SelectInst *SelectInst::clone() const { return new(getNumOperands()) SelectInst(*this); }
2811 CallInst *CallInst::clone() const {
2812 return new(getNumOperands()) CallInst(*this);
2813 }
2814 SelectInst *SelectInst::clone() const {
2815 return new(getNumOperands()) SelectInst(*this);
2816 }
28102817 VAArgInst *VAArgInst::clone() const { return new VAArgInst(*this); }
28112818
28122819 ExtractElementInst *ExtractElementInst::clone() const {
28192826 return new ShuffleVectorInst(*this);
28202827 }
28212828 PHINode *PHINode::clone() const { return new PHINode(*this); }
2822 ReturnInst *ReturnInst::clone() const { return new(getNumOperands()) ReturnInst(*this); }
2823 BranchInst *BranchInst::clone() const { return new(getNumOperands()) BranchInst(*this); }
2829 ReturnInst *ReturnInst::clone() const {
2830 return new(getNumOperands()) ReturnInst(*this);
2831 }
2832 BranchInst *BranchInst::clone() const {
2833 return new(getNumOperands()) BranchInst(*this);
2834 }
28242835 SwitchInst *SwitchInst::clone() const { return new SwitchInst(*this); }
2825 InvokeInst *InvokeInst::clone() const { return new(getNumOperands()) InvokeInst(*this); }
2836 InvokeInst *InvokeInst::clone() const {
2837 return new(getNumOperands()) InvokeInst(*this);
2838 }
28262839 UnwindInst *UnwindInst::clone() const { return new UnwindInst(); }
28272840 UnreachableInst *UnreachableInst::clone() const { return new UnreachableInst();}
28282841 GetResultInst *GetResultInst::clone() const { return new GetResultInst(*this); }
165165 } else {
166166 // If GV is external but the existing one is static, mangle the existing one
167167 if ((GV->hasExternalLinkage() || GV->hasDLLImportLinkage()) &&
168 !(ExistingValue->hasExternalLinkage() || ExistingValue->hasDLLImportLinkage())) {
168 !(ExistingValue->hasExternalLinkage()
169 || ExistingValue->hasDLLImportLinkage())) {
169170 MangledGlobals.insert(ExistingValue);
170171 ExistingValue = GV;
171172 } else if ((GV->hasExternalLinkage() ||
207208 std::map Names;
208209 for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
209210 InsertName(I, Names);
210 for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I)
211 for (Module::global_iterator I = M.global_begin(), E = M.global_end();
212 I != E;
213 ++I)
211214 InsertName(I, Names);
212215 }
6363 // list...
6464 if (Result->isAbstract()) {
6565 #if DEBUG_ABSTYPE
66 cerr << "Removing abstract type from symtab" << Result->getDescription()<<"\n";
66 cerr << "Removing abstract type from symtab"
67 << Result->getDescription()
68 << "\n";
6769 #endif
6870 cast(Result)->removeAbstractTypeUser(this);
6971 }
None //===-- Use.cpp - Implement the Use class -------------------------------===//
0 //===-- Use.cpp - Implement the Use class ---------------------------------===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
150150 //===----------------------------------------------------------------------===//
151151
152152 Use *User::allocHungoffUses(unsigned N) const {
153 Use *Begin = static_cast(::operator new(sizeof(Use) * N + sizeof(AugmentedUse) - sizeof(Use)));
153 Use *Begin = static_cast(::operator new(sizeof(Use) * N
154 + sizeof(AugmentedUse)
155 - sizeof(Use)));
154156 Use *End = Begin + N;
155157 static_cast(End[-1]).ref = addTag(this, tagOne);
156158 return Use::initTags(Begin, End);
733733 // Resolve the call to function F via the JIT API:
734734 //
735735 // call resolver(GetElementPtr...)
736 CallInst *Resolver = CallInst::Create(resolverFunc, ResolverArgs.begin(),
737 ResolverArgs.end(),
738 "resolver", LookupBB);
739 // cast the result from the resolver to correctly-typed function
740 CastInst *CastedResolver = new BitCastInst(Resolver,
741 PointerType::getUnqual(F->getFunctionType()), "resolverCast", LookupBB);
736 CallInst *Resolver =
737 CallInst::Create(resolverFunc, ResolverArgs.begin(),
738 ResolverArgs.end(), "resolver", LookupBB);
739
740 // Cast the result from the resolver to correctly-typed function.
741 CastInst *CastedResolver =
742 new BitCastInst(Resolver,
743 PointerType::getUnqual(F->getFunctionType()),
744 "resolverCast", LookupBB);
742745
743746 // Save the value in our cache.
744747 new StoreInst(CastedResolver, Cache, LookupBB);
745748 BranchInst::Create(DoCallBB, LookupBB);
746749
747 PHINode *FuncPtr = PHINode::Create(NullPtr->getType(), "fp", DoCallBB);
750 PHINode *FuncPtr = PHINode::Create(NullPtr->getType(),
751 "fp", DoCallBB);
748752 FuncPtr->addIncoming(CastedResolver, LookupBB);
749753 FuncPtr->addIncoming(CachedVal, EntryBB);
750754