[PATCH] D42759: [CGP] Split large structs to sink more GEPs

Haicheng Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 13:06:01 PST 2018


haicheng added inline comments.


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:3758
+          PointerType *BaseTy = cast<PointerType>(Base->getType());
+          if (BaseTy->getElementType()->isStructTy()) {
+            Instruction *BaseI = dyn_cast<Instruction>(Base);
----------------
efriedma wrote:
> I haven't really reviewed the whole patch closely, so I might be missing something, but why does it matter that the element type is a struct, as opposed to something else large like an array?
Nothing special, I am just being conservative in the beginning.  I find that at this stage, LLVM can bitcast arbitrary pointers to i8* and do random stuffs.  I am thinking supporting other large data structures as the next step.


Repository:
  rL LLVM

https://reviews.llvm.org/D42759





More information about the llvm-commits mailing list