llvm.org GIT mirror llvm / 17da06f
Don't analyze arguments already marked 'nocapture'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61532 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan Sands 11 years ago
3 changed file(s) with 13 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
5555 /// it in its containing function.
5656 bool hasNoAliasAttr() const;
5757
58 /// hasNoCaptureAttr - Return true if this argument has the nocapture
59 /// attribute on it in its containing function.
60 bool hasNoCaptureAttr() const;
61
5862 /// hasSRetAttr - Return true if this argument has the sret attribute on it in
5963 /// its containing function.
6064 bool hasStructRetAttr() const;
262262 continue;
263263
264264 for (Function::arg_iterator A = F->arg_begin(), E = F->arg_end(); A!=E; ++A)
265 if (isa(A->getType()) && !isCaptured(*F, A)) {
265 if (isa(A->getType()) && !A->hasNoCaptureAttr() &&
266 !isCaptured(*F, A)) {
266267 A->addAttr(Attribute::NoCapture);
267268 NumNoCapture++;
268269 Changed = true;
9999 bool Argument::hasNoAliasAttr() const {
100100 if (!isa(getType())) return false;
101101 return getParent()->paramHasAttr(getArgNo()+1, Attribute::NoAlias);
102 }
103
104 /// hasNoCaptureAttr - Return true if this argument has the nocapture attribute
105 /// on it in its containing function.
106 bool Argument::hasNoCaptureAttr() const {
107 if (!isa(getType())) return false;
108 return getParent()->paramHasAttr(getArgNo()+1, Attribute::NoCapture);
102109 }
103110
104111 /// hasSRetAttr - Return true if this argument has the sret attribute on