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.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This doesn't fix anything it just hides the problems better or replaces them with others.