diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-30 20:06:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-30 20:06:40 +0000 |
commit | a3e620caba93746e47c7dd29b24f63fd6c96294e (patch) | |
tree | c7be4ab35a22b662e6e954961eb765b7e2ab7e13 /llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp | |
parent | c856539edf0ed83f5cd50dc856b92c272ce53940 (diff) | |
download | bcm5719-llvm-a3e620caba93746e47c7dd29b24f63fd6c96294e.tar.gz bcm5719-llvm-a3e620caba93746e47c7dd29b24f63fd6c96294e.zip |
add getPointerAddressSpace() to GEP instruction, use the method
in a few scalar xforms to simplify things.
llvm-svn: 80506
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp index 5de79c49cfb..ca4292bcaa1 100644 --- a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -132,7 +132,7 @@ static bool MarkAliveBlocks(BasicBlock *BB, if (isa<UndefValue>(Ptr) || (isa<ConstantPointerNull>(Ptr) && - cast<PointerType>(Ptr->getType())->getAddressSpace() == 0)) { + SI->getPointerAddressSpace() == 0)) { ChangeToUnreachable(SI, Context); Changed = true; break; |