[polly] 34f7396 - [polly] Remove use of getWithSamePointeeType() (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 02:52:58 PDT 2023
Author: Nikita Popov
Date: 2023-07-18T11:52:27+02:00
New Revision: 34f73967aecfebcc0ab62d18af51ae57cfb5c33c
URL: https://github.com/llvm/llvm-project/commit/34f73967aecfebcc0ab62d18af51ae57cfb5c33c
DIFF: https://github.com/llvm/llvm-project/commit/34f73967aecfebcc0ab62d18af51ae57cfb5c33c.diff
LOG: [polly] Remove use of getWithSamePointeeType() (NFC)
Added:
Modified:
polly/lib/CodeGen/BlockGenerators.cpp
Removed:
################################################################################
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index 4c1336456e4961..3de1781a27a834 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -265,19 +265,7 @@ Value *BlockGenerator::generateLocationAccessed(
if (AccessExpr) {
AccessExpr = isl_ast_expr_address_of(AccessExpr);
- auto Address = ExprBuilder->create(AccessExpr);
-
- // Cast the address of this memory access to a pointer type that has the
- // same element type as the original access, but uses the address space of
- // the newly generated pointer.
- auto OldPtrTy = ExpectedType->getPointerTo();
- auto NewPtrTy = Address->getType();
- OldPtrTy = PointerType::getWithSamePointeeType(
- OldPtrTy, NewPtrTy->getPointerAddressSpace());
-
- if (OldPtrTy != NewPtrTy)
- Address = Builder.CreateBitOrPointerCast(Address, OldPtrTy);
- return Address;
+ return ExprBuilder->create(AccessExpr);
}
assert(
Pointer &&
More information about the llvm-commits
mailing list