Factorize code: remove variants of "strip off
authorDuncan Sands <baldrick@free.fr>
Wed, 1 Oct 2008 15:25:41 +0000 (15:25 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 1 Oct 2008 15:25:41 +0000 (15:25 +0000)
commit5d0392c6b370758750b397e254a6c6f028479969
treee20efed1bfb1a39e5a9854393af376de2006eb48
parent38ac062c2f4de93cd4351693f084f0c4474be02c
Factorize code: remove variants of "strip off
pointer bitcasts and GEP's", and centralize the
logic in Value::getUnderlyingObject.  The
difference with stripPointerCasts is that
stripPointerCasts only strips GEPs if all
indices are zero, while getUnderlyingObject
strips GEPs no matter what the indices are.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56922 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Value.h
lib/Analysis/BasicAliasAnalysis.cpp
lib/Analysis/IPA/GlobalsModRef.cpp
lib/Transforms/Scalar/DeadStoreElimination.cpp
lib/Transforms/Scalar/GVN.cpp
lib/Transforms/Scalar/InstructionCombining.cpp
lib/VMCore/Value.cpp