This is an archive of the discontinued LLVM Phabricator instance.

[Polly][FIX] Collection of base values for the IslExprBuilder
AbandonedPublic

Authored by jdoerfert on Sep 19 2014, 7:49 AM.

Details

Summary
When we collect base values for the isl expression builder two corner
cases where not implemented before:
  1) The memory access base value is invariant but still a load inside
     the region. These invariant loads are allowed in ScopDetection
     but need to be copied or moved if we want to use the loaded
     pointer value for e.g., runtime alias checks. We now move the
     load to the region entering block, basically licm for these kind
     of instructions.
  2) The IslExprBuilder doesn't know about types but assumes the value
     and the offset is in the unit of the base pointers type (or
     better the base pointers element type). This wasn't ensured
     before in case the base pointer was e.g., a struct pointer type.
     However, the offset provided by ScalarEvolution is already in the
     correct unit (the memory access element type). We now cast the
     base pointer into a pointer to the memory access element type.

Test cases for both situations are added and existing test cases
adjusted to the new type casting.

Diff Detail

Event Timeline

jdoerfert updated this revision to Diff 13870.Sep 19 2014, 7:49 AM
jdoerfert retitled this revision from to [Polly][FIX] Collection of base values for the IslExprBuilder.
jdoerfert updated this object.
jdoerfert added subscribers: Restricted Project, Unknown Object (MLST).
jdoerfert abandoned this revision.Oct 1 2014, 5:37 AM

This doesn't fix anything it just hides the problems better or replaces them with others.