Author: baldrick Date: Fri Jan 25 16:06:51 2008 New Revision: 46369 URL: http://llvm.org/viewvc/llvm-project?rev=46369&view=rev Log: Do this more neatly.
Modified: llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp Modified: llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp?rev=46369&r1=46368&r2=46369&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp Fri Jan 25 16:06:51 2008 @@ -245,8 +245,7 @@ // or readnone, because the copy would be unneeded: the callee doesn't // modify the struct. if (CalledFunc->paramHasAttr(ArgNo+1, ParamAttr::ByVal) && - !CalledFunc->paramHasAttr(0, ParamAttr::ReadOnly) && - !CalledFunc->paramHasAttr(0, ParamAttr::ReadNone)) { + !CalledFunc->onlyReadsMemory()) { const Type *AggTy = cast<PointerType>(I->getType())->getElementType(); const Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits