summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-01-25 22:06:51 +0000
committerDuncan Sands <baldrick@free.fr>2008-01-25 22:06:51 +0000
commitf52faf9a64c53855d3127f5720380add660994a3 (patch)
tree719b35f974fc867ed9dc462348cc32adeb5d36ad /llvm/lib/Transforms
parent555855c7793cf7115bbb7af69116ed564c697e7e (diff)
downloadbcm5719-llvm-f52faf9a64c53855d3127f5720380add660994a3.tar.gz
bcm5719-llvm-f52faf9a64c53855d3127f5720380add660994a3.zip
Do this more neatly.
llvm-svn: 46369
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index f730d534a55..552583042a7 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -245,8 +245,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
// 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);
OpenPOWER on IntegriCloud