[PATCH] Fix crash in Dependence Analysis module

hfinkel at anl.gov hfinkel at anl.gov
Tue Mar 10 05:27:56 PDT 2015


In http://reviews.llvm.org/D8162#137454, @karthikthecool wrote:

> Hi Hal,
>  The logic added currently prevents marking the GEP as UsefulGEP and hence different GEP index are not compared independently.


Okay, LGTM.

> Dependency analysis currently reports an anti dependency between the 2 memory access as -

> 

>   da analyze - consistent input [S S]!

>   da analyze - anti [S S|<]!

>   da analyze - consistent output [S S]!

> 

> as it is not considered as UsefulGEP as it doesn't know if k can overflow or not.

> 

> I understand from http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130701/179665.html that it is not valid to independently analyze 2 different indices of a GEP as the higher index may overflow into lower index but if it is provable at compile time that this never happens then we can still use this part of the code as is.

>  So we might want to add additional checks that concludes if a GEP is UsefulGEP and hence can be analyzed independently?


Yes, we might. I'm not sure whether this is useful, or whether we should just rely on / extend the delinearization analysis instead. Using the GEPs as a 'good guess' that require validation is likely reasonable.

> I still need to go through this module in more detail but i feel that part of code inside UsefulGEP will be valid if we can conculde that we can independetly analyze  different indices of a GetElementPointer.

>  Please if you could let me know if i'm thinking in the right direction. Will go through this module in more detail.


Sounds good. Please do (but this fix is fine for now).

> Thanks and Regards

>  Karthik Bhat





REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8162

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list