aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-01-19 11:36:40 +0100
committerNikita Popov <npopov@redhat.com>2022-01-19 11:36:40 +0100
commited0cdb29397ecd7d03579b846360906081d80aea (patch)
treeb4a736962492967b6e6c29932884fb43e447d377 /llvm/lib/IR/Constants.cpp
parentd56b0ad441a34ae6c353c823969397b451f053a6 (diff)
downloadllvm-ed0cdb29397ecd7d03579b846360906081d80aea.zip
llvm-ed0cdb29397ecd7d03579b846360906081d80aea.tar.gz
llvm-ed0cdb29397ecd7d03579b846360906081d80aea.tar.bz2
[Constants] Remove unused isGEPWithNoNotionalOverIndexing() method
Since d56b0ad441a34ae6c353c823969397b451f053a6, this method is no longer used -- and shouldn't be used.
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index 8fb17f6..e031f88 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -1495,28 +1495,6 @@ bool ConstantExpr::isCompare() const {
return getOpcode() == Instruction::ICmp || getOpcode() == Instruction::FCmp;
}
-bool ConstantExpr::isGEPWithNoNotionalOverIndexing() const {
- if (getOpcode() != Instruction::GetElementPtr) return false;
-
- gep_type_iterator GEPI = gep_type_begin(this), E = gep_type_end(this);
- User::const_op_iterator OI = std::next(this->op_begin());
-
- // The remaining indices may be compile-time known integers within the bounds
- // of the corresponding notional static array types.
- for (; GEPI != E; ++GEPI, ++OI) {
- if (isa<UndefValue>(*OI))
- continue;
- auto *CI = dyn_cast<ConstantInt>(*OI);
- if (!CI || (GEPI.isBoundedSequential() &&
- (CI->getValue().getActiveBits() > 64 ||
- CI->getZExtValue() >= GEPI.getSequentialNumElements())))
- return false;
- }
-
- // All the indices checked out.
- return true;
-}
-
bool ConstantExpr::hasIndices() const {
return getOpcode() == Instruction::ExtractValue ||
getOpcode() == Instruction::InsertValue;