[llvm-commits] PATCH: Fix or PR13392 and many other slow-opt-compile bugs in LLVM
Duncan Sands
baldrick at free.fr
Sun Jul 22 03:20:02 PDT 2012
Hi Chandler,
> > @@ -1867,9 +1866,20 @@ void SROA::isSafeMemAccess(uint64_t Offset,
> uint64_t MemSize,
> > return;
> > }
> > }
> > +
> > // Check if the offset/size correspond to a component within the
> alloca type.
> > Type *T = Info.AI->getAllocatedType();
> > - if (TypeHasComponent(T, Offset, MemSize)) {
> > + if (Type *EltTy = getComponentType(T, Offset, MemSize)) {
> > + // If access is untyped (memcpy, etc), and the element being accessed is
> > + // an array, disable SROA to prevent exploding the memory intrinsic into
> > + // element-wise accesses to the array, unless the total size is
> within the
> > + // scalar load threshold where we can turn it into an integer memory
> > + // access.
> > + if (!MemOpType && EltTy->isArrayTy() &&
>
> Is this really specific to arrays? Couldn't you get the same thing for structs?
>
>
> We can perform actual loads and stores of structs as a single load or store
> instruction, but we can't do that for arrays.
we can't?
Ciao, Duncan.
More information about the llvm-commits
mailing list