[PATCH] D108809: Do not use getPointerElementType in dolphinCallbacks.cpp

Dmitry Bakunevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 27 01:42:09 PDT 2021


dbakunevich created this revision.
dbakunevich added a reviewer: nikic.
dbakunevich requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

LLVM is in the process of transition to opaque pointers. We don't want it to disrupt us when it happens. We should start removing uses of getPointerElementType from LLVM code, replacing them with actual types we expect to see where possible.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108809

Files:
  openjdk/dev/hotspot/src/share/dolphin/dolphinCallbacks.cpp


Index: openjdk/dev/hotspot/src/share/dolphin/dolphinCallbacks.cpp
===================================================================
--- openjdk/dev/hotspot/src/share/dolphin/dolphinCallbacks.cpp
+++ openjdk/dev/hotspot/src/share/dolphin/dolphinCallbacks.cpp
@@ -2268,7 +2268,7 @@
     FastPathAllocations.push_back(FastAlloc);
     uint64_t Offset = KidsSize[0];
     for (unsigned i = 1; i < NumAllocs; i++) {
-      auto *PointeeTy = FastAllocRawOop->getType()->getScalarType()->getPointerElementType();
+      auto *PointeeTy = Builder.getInt8Ty();
       auto* RawOop =
           Builder.CreateGEP(PointeeTy, FastAllocRawOop, ConstantInt::get(i64, Offset));
       auto* MarkWordAddr = Builder.CreateBitCast(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108809.369044.patch
Type: text/x-patch
Size: 716 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210827/11b02a00/attachment.bin>


More information about the llvm-commits mailing list