diff options
author | Nikita Popov <npopov@redhat.com> | 2022-01-19 11:36:40 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-01-19 11:36:40 +0100 |
commit | ed0cdb29397ecd7d03579b846360906081d80aea (patch) | |
tree | b4a736962492967b6e6c29932884fb43e447d377 /llvm/lib/IR/Constants.cpp | |
parent | d56b0ad441a34ae6c353c823969397b451f053a6 (diff) | |
download | llvm-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.cpp | 22 |
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; |