[llvm-commits] [llvm] r46369 - /llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp

Duncan Sands baldrick at free.fr
Fri Jan 25 14:06:51 PST 2008


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);
         





More information about the llvm-commits mailing list