I reverted this because it's breaking the build system's sanity tests. Hopefully you or someone else working on cfe can figure out what to do with these test cases. -Andy
On Mar 23, 2011, at 12:17 PM, Andrew Trick wrote: > Hi David, > > After your checkin, a couple of tests are hitting this assertion on > clang-x86_64-darwin10-gcc42-RA: > > Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == > Params[i]->getType()) && "Calling a function with a bad signature!"), > function init, file > /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-gcc42-RA/llvm/lib/VMCore/Instructions.cpp, > line 196. > > Failing Tests (2): > Clang :: CodeGenObjC/messages.m > Clang :: Coverage/codegen-gnu.m > > <Clang -- Coverage___codegen-gnu.m.html><Clang -- > CodeGenObjC___messages.m.html> > > -Andy > > On Mar 23, 2011, at 11:39 AM, David Chisnall wrote: > >> Author: theraven >> Date: Wed Mar 23 13:39:12 2011 >> New Revision: 128156 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=128156&view=rev >> Log: >> Remove the redundant loads / stores to globals that we were generating for >> selectors (GNU runtimes). >> >> >> Modified: >> cfe/trunk/lib/CodeGen/CGObjCGNU.cpp >> >> Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=128156&r1=128155&r2=128156&view=diff >> ============================================================================== >> --- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original) >> +++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Wed Mar 23 13:39:12 2011 >> @@ -521,9 +521,12 @@ >> Types.push_back(TypedSelector(TypeEncoding, SelValue)); >> } >> >> - if (lval) >> - return SelValue; >> - return Builder.CreateLoad(SelValue); >> + if (lval) { >> + llvm::Value *tmp = Builder.CreateAlloca(SelValue->getType()); >> + Builder.CreateStore(SelValue, tmp); >> + return tmp; >> + } >> + return SelValue; >> } >> >> llvm::Value *CGObjCGNU::GetSelector(CGBuilderTy &Builder, Selector Sel, >> @@ -1906,16 +1909,12 @@ >> llvm::Constant *Idxs[] = {Zeros[0], >> llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), i), Zeros[0]}; >> // FIXME: We're generating redundant loads and stores here! >> - llvm::Constant *SelPtr = new llvm::GlobalVariable(TheModule, >> SelStructPtrTy, >> - true, llvm::GlobalValue::InternalLinkage, >> - llvm::ConstantExpr::getGetElementPtr(SelectorList, Idxs, 2), >> - ".objc_sel_ptr"); >> + llvm::Constant *SelPtr = >> llvm::ConstantExpr::getGetElementPtr(SelectorList, >> + Idxs, 2); >> // If selectors are defined as an opaque type, cast the pointer to this >> // type. >> - if (isSelOpaque) { >> - SelPtr = llvm::ConstantExpr::getBitCast(SelPtr, >> + SelPtr = llvm::ConstantExpr::getBitCast(SelPtr, >> llvm::PointerType::getUnqual(SelectorTy)); >> - } >> SelectorAliases[i]->replaceAllUsesWith(SelPtr); >> SelectorAliases[i]->eraseFromParent(); >> } >> >> >> _______________________________________________ >> cfe-commits mailing list >> [email protected] >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
