mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-30 20:24:32 +00:00
[opaque pointer type] Change GetElementPtrInst::getIndexedType to take the pointee type
This pushes the use of PointerType::getElementType up into several callers - I'll essentially just have to keep pushing that up the stack until I can eliminate every call to it... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233604 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -932,14 +932,14 @@ aliasSameBasePointerGEPs(const GEPOperator *GEP1, uint64_t V1Size,
|
||||
// Also, check that they all index through arrays.
|
||||
for (unsigned i = 1, e = GEP1->getNumIndices() - 1; i != e; ++i) {
|
||||
if (!isa<ArrayType>(GetElementPtrInst::getIndexedType(
|
||||
GEP1->getPointerOperandType(), IntermediateIndices)))
|
||||
GEP1->getSourceElementType(), IntermediateIndices)))
|
||||
return AliasAnalysis::MayAlias;
|
||||
IntermediateIndices.push_back(GEP1->getOperand(i + 1));
|
||||
}
|
||||
|
||||
StructType *LastIndexedStruct =
|
||||
dyn_cast<StructType>(GetElementPtrInst::getIndexedType(
|
||||
GEP1->getPointerOperandType(), IntermediateIndices));
|
||||
GEP1->getSourceElementType(), IntermediateIndices));
|
||||
|
||||
if (!LastIndexedStruct)
|
||||
return AliasAnalysis::MayAlias;
|
||||
|
Reference in New Issue
Block a user