[llvm-dev] [GSoC 2016] Implementation of the packing transformation

Roman Gareev via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 3 02:18:05 PDT 2016

Dear community,

I have a few questions about implementation of the packing
transformation. I would be very grateful for your ideas and comments
about them.

1. Could we set MemoryAccess::NewAccessRelation to modify an access
relation of a memory access? As far as I understand,
MemoryAccess::NewAccessRelation is only used to import memory accesses
from JSCoPs

I think that MemoryAccess::NewAccessRelation could be used in the
implementation and also help to perform, for example, array expansion.

However, the modification would probably cause issues. For example, if
we apply tiling, we'll have to substitute old induction variables
before analyzing access functions. I'm not sure whether it's possible
to do it in ScheduleOptimizer. Another possible issue could arise
during import from JSCoPs. In this case, we probably shouldn't modify
imported access relations.

2. What should we do to change an array referenced by a memory access?

If I'm not mistaken, we can set the value of MemoryAccess::BasePtr to do it.

3. Could we copy data to a new array in IslNodeBuilder::createMark?

We can probably create mark nodes, which contain references to memory
accesses that should be modified. Subsequently, using information
about original and new access relations, IslNodeBuilder::createMark
would generate functions that perform such copying.

                                    Cheers, Roman Gareev.

More information about the llvm-dev mailing list