summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-01-14 19:11:52 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-01-14 19:11:52 +0000
commit60ecc4426629dcb9567214507f47f1c702e8215b (patch)
tree69fb7b82b1d0c5f735ea37798fb5ec38d531c5bb /lib/Transforms
parent1c3e47c07a63039dac36323f632b959ab25e1b53 (diff)
downloadllvm-60ecc4426629dcb9567214507f47f1c702e8215b.tar.gz
llvm-60ecc4426629dcb9567214507f47f1c702e8215b.tar.bz2
llvm-60ecc4426629dcb9567214507f47f1c702e8215b.tar.xz
Make nocapture analysis work with addrspacecast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/FunctionAttrs.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp
index 6e41f262fa..ea664506da 100644
--- a/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -437,6 +437,7 @@ determinePointerReadAttrs(Argument *A,
case Instruction::GetElementPtr:
case Instruction::PHI:
case Instruction::Select:
+ case Instruction::AddrSpaceCast:
// The original value is not read/written via this if the new value isn't.
for (Instruction::use_iterator UI = I->use_begin(), UE = I->use_end();
UI != UE; ++UI) {
@@ -723,6 +724,7 @@ bool FunctionAttrs::IsFunctionMallocLike(Function *F,
// Extend the analysis by looking upwards.
case Instruction::BitCast:
case Instruction::GetElementPtr:
+ case Instruction::AddrSpaceCast:
FlowsToReturn.insert(RVI->getOperand(0));
continue;
case Instruction::Select: {