This is an archive of the discontinued LLVM Phabricator instance.

[Fix] Allow pointer types as access elements and compare them correct
ClosedPublic

Authored by jdoerfert on Sep 19 2014, 1:38 AM.

Details

Summary
This fixes two problems which are usualy caused together:
  1) The elements of an isl AST access expression could be pointers
     not only integers, floats and vectores thereof.
  2) The runtime alias checks need to compare pointers but if they
     are of a different type we need to cast them into a "max" type
     similar to the non pointer case.

Diff Detail

Event Timeline

jdoerfert updated this revision to Diff 13858.Sep 19 2014, 1:38 AM
jdoerfert retitled this revision from to [Fix] Allow pointer types as access elements and compare them correct.
jdoerfert updated this object.
jdoerfert added subscribers: Restricted Project, Unknown Object (MLST).
grosser accepted this revision.Sep 19 2014, 1:46 AM
grosser edited edge metadata.

Very nice fix and test case.

There is a minor nit in the test case and you may want to mention that you choose i8 as the max type,

test/Isl/CodeGen/aliasing_different_pointer_types.ll
1

-polly-code-generator=isl is not needed.

This revision is now accepted and ready to land.Sep 19 2014, 1:46 AM
jdoerfert closed this revision.Sep 19 2014, 1:59 AM

commited in r218113.