[PATCH] Fix crash in Dependence Analysis module

Karthik Bhat kv.bhat at samsung.com
Tue Mar 10 02:55:23 PDT 2015


Hi Hal,
The logic added currently prevents marking the GEP as UsefulGEP and hence different GEP index are not compared independently.
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?
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.
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